-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
prepare-for-deploy.sh
executable file
·32 lines (27 loc) · 907 Bytes
/
prepare-for-deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
#
# This script sets up this git repo for the final deploy process to
# https://f-droid.org. It will automatically delete changes in this
# local git repo that are not present in the git tag that is to be
# deployed. It is meant to be automatically triggered whenever the
# new index.jar has been published on f-droid.org.
#
# This script assumes two things:
# 1. the deploy machine includes the public GPG keys for tag verification
# 2. the 'origin' remote is set to https://gitlab.com/fdroid/fdroid-website.git
set -e
set -x
apt-get update
apt-get -qy install --no-install-recommends ca-certificates git gpg
git remote update --prune
git fetch --tags
for tag in `git tag --sort=-taggerdate`; do
if git tag -v $tag; then
git clean -fdx
git checkout -B master $tag
echo "Set up $tag to deploy!"
exit
fi
done
echo 'ERROR: could not find any signed release tags!'
exit 1