aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2020-07-08 23:09:39 +0200
committersfan5 <sfan5@live.de>2020-07-08 23:11:41 +0200
commitb4c25872f181ccd87199aeed0a26e68d03d3089b (patch)
tree9b4656bff3e2c9e4cdc9193aa26ba33c8f041ed8
parent5f3f806d674d4deb7501145a683b574455d13953 (diff)
downloadminetest-b4c25872f181ccd87199aeed0a26e68d03d3089b.tar.gz
minetest-b4c25872f181ccd87199aeed0a26e68d03d3089b.tar.bz2
minetest-b4c25872f181ccd87199aeed0a26e68d03d3089b.zip
Make util/bump_version.sh work again
-rwxr-xr-xutil/bump_version.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/bump_version.sh b/util/bump_version.sh
index 58509198a..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,12 +78,12 @@ 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"