diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 16:55:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 16:55:34 +0000 |
commit | 75417f5e3d32645859d94cec82255dc130ec4a2e (patch) | |
tree | 5fd46925c6b4a881c9208772ed8e5cc0588bc164 /release-utils/post-release.sh | |
parent | Initial commit. (diff) | |
download | privacybadger-75417f5e3d32645859d94cec82255dc130ec4a2e.tar.xz privacybadger-75417f5e3d32645859d94cec82255dc130ec4a2e.zip |
Adding upstream version 2020.10.7.upstream/2020.10.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'release-utils/post-release.sh')
-rwxr-xr-x | release-utils/post-release.sh | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/release-utils/post-release.sh b/release-utils/post-release.sh new file mode 100755 index 0000000..4bfe00e --- /dev/null +++ b/release-utils/post-release.sh @@ -0,0 +1,77 @@ +#!/bin/bash + +cd "$(dirname "$0")" +source ./config.sh +PKGDIR=../pkg +if [ $# -ne 1 ] ; then + echo "Usage: $0 <version to release>" + exit 1 +fi +TARGET=$1 +if ! git show release-"$TARGET" > /dev/null 2> /dev/null ; then + echo "$TARGET is not a valid git target" + exit 1 +fi +PKG="$PKGDIR"/privacy-badger-eff-$TARGET.xpi +ALT="$PKGDIR"/privacy-badger-eff-latest.xpi + +echo Copying .xpi files... +scp "$PKG" "$USER@$SERVER:/www/eff.org/files" || exit 1 +scp "$ALT" "$USER@$SERVER:/www/eff.org/files" || exit 1 +echo Copying detached signature +scp "$PKG".sig "$USER@$SERVER:/www/eff.org/files" || exit 1 +echo Copying Changelog.txt +git show release-"$TARGET":doc/Changelog > /tmp/pbchangelog$$ || exit 1 +scp /tmp/pbchangelog$$ "$USER@$SERVER:/www/eff.org/files/pbChangelog.txt" || exit 1 +rm -f /tmp/changelog$$ + +MSG=/tmp/email$$ + +echo "Privacy Badger $TARGET has been released for all supported browsers." > $MSG +echo "As always, you can get it from https://privacybadger.org/ or from your browser's add-on gallery." >> $MSG +echo "" >> $MSG +echo "Notable updates:" >> $MSG +echo "" >> $MSG +tail -n+5 ../doc/Changelog | sed '/^$/q' >> $MSG +echo "For further details, consult our release notes on GitHub:" >> $MSG +echo "https://github.com/EFForg/privacybadger/releases/tag/release-$TARGET" >> $MSG + +echo To send email to the mailing list... +echo mutt -s "Privacy\ Badger\ version\ $TARGET\ released" privacybadger@eff.org '<' $MSG +echo "Now please edit https://www.eff.org/files/privacy-badger-updates.json to include the following" +echo "" +echo "{" +echo " \"version\": \"$TARGET\"," +echo " \"update_link\": \"https://eff.org/files/privacy-badger-eff-$TARGET.xpi\"," +echo " \"update_hash\": \"sha256:$(sha256sum "$PKG" | cut -c 1-64)\"," +echo " \"applications\": {" +echo " \"gecko\": { \"strict_min_version\": \"52.0\" }" +echo " }" +echo "}" + +echo "" +echo "AMO release notes:" +echo "" +echo "<ul>" +tail -n+5 ../doc/Changelog | sed '/^$/q' | { + out="" + while IFS= read -r line; do + # changelog entries start with "*" + if [ "${line:0:1}" = "*" ]; then + # this is the first entry + if [ -z "$out" ]; then + out="<li>${line:2}" + else + out="$out</li>\n<li>${line:2}" + fi + # changelog entry continues + else + if [ -n "$line" ]; then + out="$out $line" + fi + fi + done + echo -e "$out</li>" +} +echo "</ul>" +echo "" |