diff options
Diffstat (limited to 'util/bump_version.sh')
-rwxr-xr-x | util/bump_version.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/util/bump_version.sh b/util/bump_version.sh index ad1c9e1cd..996962199 100755 --- a/util/bump_version.sh +++ b/util/bump_version.sh @@ -23,7 +23,7 @@ prompt_for_number() { perform_release() { sed -i -re "s/^set\(DEVELOPMENT_BUILD TRUE\)$/set(DEVELOPMENT_BUILD FALSE)/" CMakeLists.txt - sed -i -re "s/versionCode [0-9]+$/versionCode $NEW_ANDROID_VERSION_CODE/" build/android/build.gradle + sed -i -re "s/\"versionCode\", [0-9]+/\"versionCode\", $NEW_ANDROID_VERSION_CODE/" build/android/build.gradle sed -i '/\<release/s/\(version\)="[^"]*"/\1="'"$RELEASE_VERSION"'"/' misc/net.minetest.minetest.appdata.xml @@ -78,19 +78,20 @@ cd ${0%/*}/.. grep -q -E '^set\(VERSION_MAJOR [0-9]+\)$' CMakeLists.txt grep -q -E '^set\(VERSION_MINOR [0-9]+\)$' CMakeLists.txt grep -q -E '^set\(VERSION_PATCH [0-9]+\)$' CMakeLists.txt -grep -q -E 'versionCode [0-9]+$' build/android/build.gradle +grep -q -E '\("versionCode", [0-9]+\)' build/android/build.gradle VERSION_MAJOR=$(grep -E '^set\(VERSION_MAJOR [0-9]+\)$' CMakeLists.txt | tr -dC 0-9) VERSION_MINOR=$(grep -E '^set\(VERSION_MINOR [0-9]+\)$' CMakeLists.txt | tr -dC 0-9) VERSION_PATCH=$(grep -E '^set\(VERSION_PATCH [0-9]+\)$' CMakeLists.txt | tr -dC 0-9) -ANDROID_VERSION_CODE=$(grep -E 'versionCode [0-9]+$' build/android/build.gradle | tr -dC 0-9) +ANDROID_VERSION_CODE=$(grep -E '"versionCode", [0-9]+' build/android/build.gradle | tr -dC 0-9) RELEASE_VERSION="$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH" echo "Current Minetest version: $RELEASE_VERSION" echo "Current Android version code: $ANDROID_VERSION_CODE" -NEW_ANDROID_VERSION_CODE=$(expr $ANDROID_VERSION_CODE + 1) +# +1 for ARM and +1 for ARM64 APKs +NEW_ANDROID_VERSION_CODE=$(expr $ANDROID_VERSION_CODE + 2) NEW_ANDROID_VERSION_CODE=$(prompt_for_number "Set android version code" $NEW_ANDROID_VERSION_CODE) echo |