Debian package repository: take aptly repo vs publish into account

This commit is contained in:
Robur 2022-02-25 13:34:24 +00:00
parent ca5b16a161
commit 078d48730d
2 changed files with 5 additions and 6 deletions

View file

@ -41,6 +41,10 @@ deb https://apt.robur.coop/ debian-10 main
The `debian-10` can be exchanged with any platform you're building debian The `debian-10` can be exchanged with any platform you're building debian
packages for. packages for.
Currently, the `dpkg-repo.sh` sets the HOME to `/home/builder` (where aptly
expects its configuration), and uses the platform (from builder) as
distribution.
## FreeBSD package repository ## FreeBSD package repository
The dependency is FreeBSD's pkg utility. The dependency is FreeBSD's pkg utility.

View file

@ -106,12 +106,7 @@ sed -i "" -e "s/Version:.*/Version: ${NEW_VERSION}/g" "${TMP}/DEBIAN/control"
dpkg-deb --build "${TMP}" "${TMP}" dpkg-deb --build "${TMP}" "${TMP}"
REPO_EXISTS=1
if ! aptly repo show "${PLATFORM}" > /dev/null 2>&1; then if ! aptly repo show "${PLATFORM}" > /dev/null 2>&1; then
REPO_EXISTS=0
fi
if [ "${REPO_EXISTS}" -eq 0 ]; then
aptly repo create --distribution="${PLATFORM}" "${PLATFORM}" aptly repo create --distribution="${PLATFORM}" "${PLATFORM}"
fi fi
@ -119,7 +114,7 @@ aptly repo add "${PLATFORM}" "${TMP}"
: "${REPO_KEYID:="D5E2DC92617877EDF7D4FD4345EA05FB7E26053D"}" : "${REPO_KEYID:="D5E2DC92617877EDF7D4FD4345EA05FB7E26053D"}"
if [ "${REPO_EXISTS}" -eq 0 ]; then if ! aptly publish show "${PLATFORM}" > /dev/null 2>&1; then
aptly publish repo -gpg-key="${REPO_KEYID}" "${PLATFORM}" aptly publish repo -gpg-key="${REPO_KEYID}" "${PLATFORM}"
else else
aptly publish update -gpg-key="${REPO_KEYID}" "${PLATFORM}" aptly publish update -gpg-key="${REPO_KEYID}" "${PLATFORM}"