Use 'aws s3 rsync' to upload linux builds, not aptly
This commit is contained in:
parent
0ab09711a4
commit
68eac613d7
2 changed files with 32 additions and 46 deletions
12
.aptly.conf
12
.aptly.conf
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"S3PublishEndpoints": {
|
|
||||||
"signal-desktop-apt": {
|
|
||||||
"region": "us-east-1",
|
|
||||||
"bucket": "updates.signal.org",
|
|
||||||
"prefix": "desktop/apt",
|
|
||||||
"acl": "public-read",
|
|
||||||
"plusWorkaround": false,
|
|
||||||
"disableMultiDel": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
66
aptly.sh
66
aptly.sh
|
@ -3,26 +3,7 @@
|
||||||
# Copyright 2017-2021 Signal Messenger, LLC
|
# Copyright 2017-2021 Signal Messenger, LLC
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
# Setup - creates the local repo which will be mirrored up to S3, then back-fill it. Your
|
# First run on a machine - uncomment the two 'first run' sections below, comment out the 'later runs' section.
|
||||||
# future deploys will eliminate all old versions without these backfill steps:
|
|
||||||
# aptly repo create signal-desktop
|
|
||||||
# aptly mirror create -ignore-signatures backfill-mirror https://updates.signal.org/desktop/apt xenial
|
|
||||||
# aptly mirror update -ignore-signatures backfill-mirror
|
|
||||||
# aptly repo import backfill-mirror signal-desktop signal-desktop signal-desktop-beta
|
|
||||||
# aptly repo show -with-packages signal-desktop
|
|
||||||
#
|
|
||||||
# First run on a machine - uncomment the first set of 'aptly publish snapshot' commands,
|
|
||||||
# comment the other two. Sets up the two publish channels, one local, one to S3.
|
|
||||||
#
|
|
||||||
# Testing - comment out the lines with s3:$ENDPOINT to publish only locally. To eliminate
|
|
||||||
# effects of testing, remove package from repo, then move back to old snapshot:
|
|
||||||
# aptly repo remove signal-desktop signal-desktop_1.0.35_amd64
|
|
||||||
# aptly publish switch -gpg-key=57F6FB06 xenial signal-desktop_v1.0.34
|
|
||||||
#
|
|
||||||
# Pruning package set - we generally want 2-3 versions of each stream available,
|
|
||||||
# production and beta. You can remove old packages like this:
|
|
||||||
# aptly repo show -with-packages signal-desktop
|
|
||||||
# aptly repo remove signal-desktop signal-desktop_1.0.34_amd64
|
|
||||||
#
|
#
|
||||||
# Release:
|
# Release:
|
||||||
# NAME=signal-desktop(-beta) VERSION=X.X.X ./aptly.sh
|
# NAME=signal-desktop(-beta) VERSION=X.X.X ./aptly.sh
|
||||||
|
@ -31,30 +12,47 @@ set -e
|
||||||
set -u
|
set -u
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
echo "Releasing $NAME build version $VERSION"
|
echo
|
||||||
|
echo "aptly.sh: Releasing $NAME build version $VERSION"
|
||||||
|
|
||||||
REPO=signal-desktop
|
REPO=signal-desktop
|
||||||
CURRENT=xenial
|
CURRENT=xenial
|
||||||
# PREVIOUS=xenial
|
|
||||||
ENDPOINT=signal-desktop-apt # Matches endpoint name in .aptly.conf
|
|
||||||
SNAPSHOT="signal-desktop_v$VERSION"
|
SNAPSHOT="signal-desktop_v$VERSION"
|
||||||
GPG_KEYID=57F6FB06
|
GPG_KEYID=57F6FB06
|
||||||
|
|
||||||
|
# FIRST RUN
|
||||||
|
# echo
|
||||||
|
# echo "aptly.sh: Setting up repo and mirror"
|
||||||
|
# aptly repo create signal-desktop
|
||||||
|
# aptly mirror create -ignore-signatures backfill-mirror https://updates.signal.org/desktop/apt xenial
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "aptly.sh: Fetching latest released files so we don't erase anything"
|
||||||
|
aptly mirror update -ignore-signatures backfill-mirror
|
||||||
|
aptly repo import backfill-mirror signal-desktop signal-desktop signal-desktop-beta
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "aptly.sh: Adding newly-built deb to repo"
|
||||||
aptly repo add "$REPO" release/"$NAME"_"$VERSION"_*.deb
|
aptly repo add "$REPO" release/"$NAME"_"$VERSION"_*.deb
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "aptly.sh: Creating a snapshot from the current state of the repo"
|
||||||
aptly snapshot create "$SNAPSHOT" from repo "$REPO"
|
aptly snapshot create "$SNAPSHOT" from repo "$REPO"
|
||||||
|
|
||||||
# run these only on first release to a given repo from a given machine. the first set is
|
# FIRST RUN - https://www.aptly.info/doc/aptly/publish/snapshot/
|
||||||
# for local testing, the second set is to set up the production server.
|
# echo
|
||||||
# https://www.aptly.info/doc/aptly/publish/snapshot/
|
# echo "aptly.sh: Setting up local publish with current snapshot"
|
||||||
# aptly publish snapshot -gpg-key="$GPG_KEYID" -distribution="$CURRENT" "$SNAPSHOT"
|
# aptly publish snapshot -gpg-key="$GPG_KEYID" -distribution="$CURRENT" "$SNAPSHOT"
|
||||||
# aptly publish snapshot -gpg-key="$GPG_KEYID" -distribution="$PREVIOUS" "$SNAPSHOT"
|
|
||||||
# aptly publish snapshot -gpg-key="$GPG_KEYID" -distribution="$CURRENT" -config=.aptly.conf "$SNAPSHOT" "s3:$ENDPOINT:"
|
|
||||||
# aptly publish snapshot -gpg-key="$GPG_KEYID" -distribution="$PREVIOUS" -config=.aptly.conf "$SNAPSHOT" "s3:$ENDPOINT:"
|
|
||||||
|
|
||||||
# these update already-published repos, run every time after that
|
# LATER RUNS - https://www.aptly.info/doc/aptly/publish/switch/
|
||||||
# https://www.aptly.info/doc/aptly/publish/switch/
|
echo
|
||||||
|
echo "aptly.sh: Switching local publish to current snapshot"
|
||||||
aptly publish switch -gpg-key="$GPG_KEYID" "$CURRENT" "$SNAPSHOT"
|
aptly publish switch -gpg-key="$GPG_KEYID" "$CURRENT" "$SNAPSHOT"
|
||||||
# aptly publish switch -gpg-key="$GPG_KEYID" "$PREVIOUS" "$SNAPSHOT"
|
|
||||||
aptly publish switch -gpg-key="$GPG_KEYID" -config=.aptly.conf "$CURRENT" "s3:$ENDPOINT:" "$SNAPSHOT"
|
|
||||||
# aptly publish switch -gpg-key="$GPG_KEYID" -config=.aptly.conf "$PREVIOUS" "s3:$ENDPOINT:" "$SNAPSHOT"
|
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "aptly.sh: Syncing local publish to s3"
|
||||||
|
/usr/bin/aws s3 sync ~/.aptly/public/pool/ s3://updates.signal.org/desktop/apt/pool/
|
||||||
|
/usr/bin/aws s3 sync ~/.aptly/public/dists/ s3://updates.signal.org/desktop/apt/dists/
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "aptly.sh: Complete!"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue