Fix Android support in bump_version.sh (#10836)
parent
e86c93f0bf
commit
6693a4b30e
|
@ -1,7 +1,7 @@
|
|||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
project.ext.set("versionMajor", 5) // Version Major
|
||||
project.ext.set("versionMinor", 3) // Version Minor
|
||||
project.ext.set("versionMinor", 4) // Version Minor
|
||||
project.ext.set("versionPatch", 0) // Version Patch
|
||||
project.ext.set("versionExtra", "-dev") // Version Extra
|
||||
project.ext.set("versionCode", 30) // Android Version Code
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
##################################
|
||||
|
|
Loading…
Reference in New Issue