From b173283d99f5d2d4888328e8612bfb6a7f7656ff Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Fri, 19 May 2023 09:47:27 -0700 Subject: [PATCH] aptly.sh: Introduce a way to download previous builds before release --- aptly.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/aptly.sh b/aptly.sh index 5762b402e759..f7508e674417 100755 --- a/aptly.sh +++ b/aptly.sh @@ -29,6 +29,24 @@ if [ ! -d ~/.aptly/public ] ; then FIRST_RUN=true fi +if [ "${DISABLE_APTLY_DOWNLOAD}" != "true" ] ; then + echo + echo "aptly.sh: Fetching latest released files so we don't erase anything" + + if ! aptly mirror show backfill-mirror; then + echo "aptly.sh: No existing mirror, setting it up" + aptly mirror create -ignore-signatures backfill-mirror "https://updates.signal.org/$APTLY_SOURCE" xenial + else + echo "aptly.sh: Mirror is already in place" + fi + + echo "aptly.sh: Updating mirror" + aptly mirror update -ignore-signatures backfill-mirror + + echo "aptly.sh: Importing existing releases" + aptly repo import backfill-mirror signal-desktop signal-desktop signal-desktop-beta +fi + echo echo "aptly.sh: Adding newly-built deb to repo" aptly repo add "$REPO" release/"$NAME"_"$VERSION"_*.deb