summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2020-09-07 21:19:15 +0000
committerJanito Vaqueiro Ferreira Filho <janito@mullvad.net>2020-09-08 12:00:45 +0000
commit48a71d9b70c150c3de44420ff7ed47d1c72f454d (patch)
tree5b7c52d78492a6fc56e4b27b49ca10dbbc89c2e1
parentf1a0ac4d6c583e7c8be0780759c96b803ef964cd (diff)
downloadmullvadvpn-48a71d9b70c150c3de44420ff7ed47d1c72f454d.tar.xz
mullvadvpn-48a71d9b70c150c3de44420ff7ed47d1c72f454d.zip
Update `prepare_release.sh` to emit Android tags
-rwxr-xr-xprepare_release.sh41
1 files changed, 37 insertions, 4 deletions
diff --git a/prepare_release.sh b/prepare_release.sh
index 5c0a8f7d47..df3e9ae25e 100755
--- a/prepare_release.sh
+++ b/prepare_release.sh
@@ -5,12 +5,39 @@
set -eu
-if [[ "$#" != "1" ]]; then
- echo "Please give the release version as the first and only argument to this script."
+PRODUCT_VERSION=""
+ANDROID="false"
+DESKTOP="false"
+
+for argument in "$@"; do
+ case "$argument" in
+ "--android")
+ ANDROID="true"
+ ;;
+ "--desktop")
+ DESKTOP="true"
+ ;;
+ -*)
+ echo "Unknown option \"$argument\""
+ exit 1
+ ;;
+ *)
+ PRODUCT_VERSION="$argument"
+ ;;
+ esac
+done
+
+if [ -z "$PRODUCT_VERSION" ]; then
+ echo "Please give the release version as an argument to this script."
echo "For example: '2018.1-beta3' for a beta release, or '2018.6' for a stable one."
exit 1
fi
-PRODUCT_VERSION=$1
+
+if [[ "$ANDROID" != "true" && "$DESKTOP" != "true" ]]; then
+ echo "Please specify if the release is for the desktop app and/or for Android app."
+ echo "For example: --android --desktop"
+ exit 1
+fi
if [[ $(git diff --shortstat 2> /dev/null | tail -n1) != "" ]]; then
echo "Dirty working directory! Will not accept that for an official release."
@@ -51,7 +78,13 @@ git commit -S -m "Updating version in package files" \
dist-assets/windows/version.h
echo "Tagging current git commit with release tag $PRODUCT_VERSION..."
-git tag -s $PRODUCT_VERSION -m $PRODUCT_VERSION
+
+if [[ "$ANDROID" == "true" ]]; then
+ git tag -s "android/$PRODUCT_VERSION" -m "android/$PRODUCT_VERSION"
+fi
+if [[ "$DESKTOP" == "true" ]]; then
+ git tag -s $PRODUCT_VERSION -m $PRODUCT_VERSION
+fi
./version-metadata.sh delete-backup