diff options
author | rubenwardy <rw@rubenwardy.com> | 2021-01-20 20:37:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-20 20:37:24 +0000 |
commit | 6693a4b30e37157becf79b4b20e991271a425609 (patch) | |
tree | bd71aab4e9d82f09890cc16ee32ec94b6d0ad1d4 /util | |
parent | e86c93f0bfe6c094014705fd659f186e2723522d (diff) | |
download | minetest-6693a4b30e37157becf79b4b20e991271a425609.tar.gz minetest-6693a4b30e37157becf79b4b20e991271a425609.tar.bz2 minetest-6693a4b30e37157becf79b4b20e991271a425609.zip |
Fix Android support in bump_version.sh (#10836)
Diffstat (limited to 'util')
-rwxr-xr-x | util/bump_version.sh | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/util/bump_version.sh b/util/bump_version.sh index 996962199..4b12935bd 100755 --- a/util/bump_version.sh +++ b/util/bump_version.sh @@ -21,14 +21,14 @@ prompt_for_number() { # * Commit the changes # * Tag with current version perform_release() { + RELEASE_DATE=$(date +%Y-%m-%d) + sed -i -re "s/^set\(DEVELOPMENT_BUILD TRUE\)$/set(DEVELOPMENT_BUILD FALSE)/" CMakeLists.txt + sed -i 's/project.ext.set("versionExtra", "-dev")/project.ext.set("versionExtra", "")/' 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 - - RELEASE_DATE=`date +%Y-%m-%d` - sed -i 's/\(<release date\)="[^"]*"/\1="'"$RELEASE_DATE"'"/' misc/net.minetest.minetest.appdata.xml git add -f CMakeLists.txt build/android/build.gradle misc/net.minetest.minetest.appdata.xml @@ -47,20 +47,24 @@ perform_release() { back_to_devel() { echo 'Creating "return back to development" commit' + # Update CMakeList.txt versions sed -i -re 's/^set\(DEVELOPMENT_BUILD FALSE\)$/set(DEVELOPMENT_BUILD TRUE)/' CMakeLists.txt - sed -i -re "s/^set\(VERSION_MAJOR [0-9]+\)$/set(VERSION_MAJOR $NEXT_VERSION_MAJOR)/" CMakeLists.txt - sed -i -re "s/^set\(VERSION_MINOR [0-9]+\)$/set(VERSION_MINOR $NEXT_VERSION_MINOR)/" CMakeLists.txt - sed -i -re "s/^set\(VERSION_PATCH [0-9]+\)$/set(VERSION_PATCH $NEXT_VERSION_PATCH)/" CMakeLists.txt - sed -i -re "1s/[0-9]+\.[0-9]+\.[0-9]+/$NEXT_VERSION/g" doc/menu_lua_api.txt + # Update Android versions + sed -i 's/set("versionExtra", "")/set("versionExtra", "-dev")/' build/android/build.gradle + sed -i -re "s/set\(\"versionMajor\", [0-9]+\)/set(\"versionMajor\", $NEXT_VERSION_MAJOR)/" build/android/build.gradle + sed -i -re "s/set\(\"versionMinor\", [0-9]+\)/set(\"versionMinor\", $NEXT_VERSION_MINOR)/" build/android/build.gradle + sed -i -re "s/set\(\"versionPatch\", [0-9]+\)/set(\"versionPatch\", $NEXT_VERSION_PATCH)/" build/android/build.gradle + # Update doc versions + sed -i -re "1s/[0-9]+\.[0-9]+\.[0-9]+/$NEXT_VERSION/g" doc/menu_lua_api.txt sed -i -re "1s/[0-9]+\.[0-9]+\.[0-9]+/$NEXT_VERSION/g" doc/client_lua_api.txt - git add -f CMakeLists.txt doc/menu_lua_api.txt doc/client_lua_api.txt - + # Commit + git add -f CMakeLists.txt build/android/build.gradle doc/menu_lua_api.txt doc/client_lua_api.txt git commit -m "Continue with $NEXT_VERSION-dev" } ################################## |