signal-desktop/aptly.sh

36 lines
940 B
Bash
Raw Normal View History

2017-04-06 22:10:04 +00:00
#!/bin/bash
# Setup:
# aptly repo create signal-desktop
#
# Release:
# aptly repo add signal-desktop path/to/signal-desktop_X.X.X_amd64.deb
# VERSION=vX.X.X ./aptly.sh
REPO=signal-desktop
DISTRO=xenial
ENDPOINT=signal-desktop-apt # Matches endpoint name in .aptly.conf
2017-04-13 22:58:10 +00:00
DEB_PATH=dist
2017-04-06 22:10:04 +00:00
SNAPSHOT=signal-desktop_v$VERSION
GPG_KEYID=57F6FB06
aptly repo add $REPO $DEB_PATH/$REPO\_$VERSION\_*.deb
while true; do
read -p "Create snapshot?" yn
case $yn in
[Yy]* ) break;;
[Nn]* ) exit;;
* ) echo "Please answer yes or no.";
esac
done
aptly snapshot create $SNAPSHOT from repo $REPO
while true; do
read -p "Deploy snapshot?" yn
case $yn in
[Yy]* ) break;;
[Nn]* ) exit;;
* ) echo "Please answer yes or no.";
esac
done
aptly publish switch -gpg-key=$GPG_KEYID $DISTRO $SNAPSHOT
aptly publish switch -gpg-key=$GPG_KEYID -config=.aptly.conf $DISTRO s3:$ENDPOINT: $SNAPSHOT