Skip to content

Commit

Permalink
scripts/prepare_release.sh: run gradlew sync from script
Browse files Browse the repository at this point in the history
  • Loading branch information
tenzap committed Apr 8, 2023
1 parent 2c90c8e commit 6d09d8d
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions scripts/prepare_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,13 @@ echo -n "Creating tag for version $VER..."
git tag -a -m "release $VER" "$VER"
echo " Done."

echo
echo "Sync gradle in Android Studio, then press Enter"
read -r
echo "Sync-ing gradle"
./gradlew tasks > /dev/null

VerCode="$(cut -d'+' -f2 < version_last_tag.txt)"

echo
echo "Set this versions in build.gradle: $((VerCode+1)) (no need to sync gradle), then press Enter"
echo "Change build.gradle: use manual versionCode and versionName and set versionCode to $((VerCode+1)), then press Enter"
read -r

echo
Expand Down Expand Up @@ -111,8 +110,9 @@ done
# To update version_last_tag.txt
git tag -a -m "release $VER" "$VER"
echo
echo "Sync gradle in Android Studio, then press Enter"
read -r
echo "Sync-ing gradle"
./gradlew tasks > /dev/null

git tag -d "$VER"

git add fastlane/metadata/**
Expand All @@ -124,9 +124,12 @@ git tag -a -m "release $VER" "$VER"
git reflog expire --expire=90.days.ago --expire-unreachable=now --all

echo
echo "Change build.gradle: revert to automatic versionCode and versionName, sync gradle, then press Enter"
echo "Change build.gradle: revert to automatic versionCode and versionName, then press Enter"
read -r

echo "Sync-ing gradle"
./gradlew tasks > /dev/null

git add app/build.gradle
git commit -m "revert to automatic versionCode and versionName"

Expand Down

0 comments on commit 6d09d8d

Please sign in to comment.