repo scripts: remove existing packages

In the end the packaging tooling does not like multiple versions of
the same package. Thus we remove old packages before publishing.
This commit is contained in:
Robur 2023-11-20 12:11:52 +00:00
parent 6ba2994dcf
commit bf35e3fbae
2 changed files with 3 additions and 0 deletions

View file

@ -124,6 +124,7 @@ PKG_DIR="${REPO_DIR}/All"
# and then move it before recreating the index
pkg create -r "${PKG_ROOT}" -m "${MANIFEST}" -o "${TMP}"
mkdir -p "${PKG_DIR}"
rm -f "${PKG_DIR}"/"${NAME}"-*.pkg
mv "${TMP}/${NAME}-${FULL_VERSION}.pkg" "${PKG_DIR}"
pkg repo "${REPO_DIR}" "${REPO_KEY}"

View file

@ -124,6 +124,8 @@ if ! aptly repo show "${PLATFORM}" > /dev/null 2>&1; then
aptly repo create --distribution="${PLATFORM}" "${PLATFORM}"
fi
PACKAGE=$(dpkg-deb -f "${FILENAME}" Package)
aptly repo remove "${PLATFORM}" "${PACKAGE}"
aptly repo add "${PLATFORM}" "${TMP}"
: "${REPO_KEYID:="D5E2DC92617877EDF7D4FD4345EA05FB7E26053D"}"