Calendar: remove past event
[tails/test.git] / bin / prepare-included-website-for-release
blobe94f1a15842d75f206cb7b42261158cc1eb07520
1 #!/bin/bash
3 set -eu
4 set -x
6 # For git_current_branch
7 . "$(dirname "$0")"/../auto/scripts/utils.sh
9 ### Sanity checks
11 [ "$(git_current_branch)" = "${RELEASE_BRANCH:?}" ] \
12 || error "Not on branch '$RELEASE_BRANCH'"
14 ### Merge `master` into the branch used for the release
16 git fetch origin && git merge origin/master
18 if [ "$DIST" = stable ]; then # preparing a final release
19 echo "${VERSION:?}" > wiki/src/inc/stable_amd64_version.html
20 echo -n "${RELEASE_DATE:?}" > wiki/src/inc/stable_amd64_date.html
21 for type in img iso ; do
22 basename="tails-amd64-${VERSION:?}"
23 filename="${basename:?}.${type:?}"
24 echo "TZ=UTC gpg --no-options --keyid-format long --verify ${filename:?}.sig ${filename:?}" \
25 > wiki/src/inc/stable_amd64_${type:?}_gpg_verify.html
26 echo "http://dl.amnesia.boum.org/tails/stable/${basename:?}/${filename:?}" \
27 > wiki/src/inc/stable_amd64_${type:?}_url.html
28 echo "https://tails.boum.org/torrents/files/${filename:?}.sig" \
29 > wiki/src/inc/stable_amd64_${type:?}_sig_url.html
30 echo "https://tails.boum.org/torrents/files/${filename:?}.torrent" \
31 > wiki/src/inc/stable_amd64_${type:?}_torrent_url.html
32 done
33 git commit wiki/src/inc/ -m "Update version and date for ${VERSION:?}."
36 ### Signing key downloaded by the Upgrader
38 TMP_GNUPG_HOME=$(mktemp -d)
39 gpg --homedir "${TMP_GNUPG_HOME:?}" --import wiki/src/tails-signing.key
40 gpg --homedir "${TMP_GNUPG_HOME:?}" \
41 --export-filter drop-subkey="revoked == 1" \
42 --export-options export-minimal \
43 --armor --export "${TAILS_SIGNATURE_KEY:?}" \
44 > wiki/src/tails-signing-minimal.key
45 git commit wiki/src/tails-signing-minimal.key \
46 -m "Update signing key used by the Upgrader" || :
47 rm -rf "${TMP_GNUPG_HOME:?}"
49 ### Translations
51 ./build-website --rebuild
52 git add wiki/src
53 git commit -m 'Update website PO files.'
55 ### Push
57 git push origin "${RELEASE_BRANCH:?}:${RELEASE_BRANCH:?}"