Skip to content

Commit

Permalink
Remove desktop parts in the old prepare-release.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
raksooo committed Jan 31, 2025
1 parent 9a2072c commit 0e9daf1
Showing 1 changed file with 3 additions and 33 deletions.
36 changes: 3 additions & 33 deletions prepare-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,12 @@
set -eu

ANDROID="false"
DESKTOP="false"
VERSION_METADATA_ARGS=""

for argument in "$@"; do
case "$argument" in
"--android")
ANDROID="true"
;;
"--desktop")
DESKTOP="true"
VERSION_METADATA_ARGS+="--desktop "
;;
-*)
echo "Unknown option \"$argument\""
exit 1
Expand All @@ -34,9 +28,9 @@ if [[ -z ${PRODUCT_VERSION+x} ]]; then
exit 1
fi

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"
if [[ "$ANDROID" != "true" ]]; then
echo "Please specify if the release is for the for the Android app."
echo "For example: --android"
exit 1
fi

Expand All @@ -45,18 +39,6 @@ if [[ $(git diff --shortstat 2> /dev/null | tail -n1) != "" ]]; then
exit 1
fi

desktop_changes_path=desktop/packages/mullvad-vpn/changes.txt
if [[ $DESKTOP == "true" && $(grep "CHANGE THIS BEFORE A RELEASE" $desktop_changes_path) != "" ]]; then
echo "It looks like you did not update $desktop_changes_path"
exit 1
fi

if [[ "$DESKTOP" == "true" && $(grep "^## \\[$PRODUCT_VERSION\\] - " CHANGELOG.md) == "" ]]; then
echo "It looks like you did not add $PRODUCT_VERSION to the changelog?"
echo "Please make sure the changelog is up to date and correct before you proceed."
exit 1
fi

if [[ "$ANDROID" == "true" &&
$PRODUCT_VERSION != *"alpha"* &&
$(grep "^## \\[android/$PRODUCT_VERSION\\] - " android/CHANGELOG.md) == "" ]]; then
Expand All @@ -75,12 +57,6 @@ if [[ "$ANDROID" == "true" ]]; then
dist-assets/relays/relays.json
fi

if [[ "$DESKTOP" == "true" ]]; then
echo "$PRODUCT_VERSION" > dist-assets/desktop-product-version.txt
git commit -S -m "Update desktop app version to $PRODUCT_VERSION" \
dist-assets/desktop-product-version.txt
fi

if [[ "$ANDROID" == "true" ]]; then
echo "$PRODUCT_VERSION" > dist-assets/android-version-name.txt
ANDROID_VERSION="$PRODUCT_VERSION" cargo run -q --bin mullvad-version versionCode > \
Expand All @@ -98,12 +74,6 @@ if [[ "$ANDROID" == "true" ]]; then
git tag -s "android/$PRODUCT_VERSION" -m "android/$PRODUCT_VERSION"
NEW_TAGS+=" android/$PRODUCT_VERSION"
fi
if [[ "$DESKTOP" == "true" ]]; then
echo "Tagging current git commit with release tag $PRODUCT_VERSION..."

git tag -s "$PRODUCT_VERSION" -m "$PRODUCT_VERSION"
NEW_TAGS+=" $PRODUCT_VERSION"
fi

echo "================================================="
echo "| DONE preparing for a release! |"
Expand Down

0 comments on commit 0e9daf1

Please sign in to comment.