Add script to release a new version

This commit is contained in:
Brandon Presley 2022-07-26 12:35:51 +12:00
parent 0cfb214b56
commit 477f28775a
1 changed files with 11 additions and 0 deletions

11
release.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
set -ex
cd android || exit 1
target=app/build.gradle
newVersion=$(grep '^\s*versionCode [0-9]*$' "$target" | awk '{print $2+1}')
sed -i "s/\(^\s*\)versionCode [0-9]*$/\1versionCode $newVersion/" "$target"
./gradlew bundleRelease
git add app/build.gradle
git commit -m "Bundle version $newVersion"
cd ..