summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6cfaee4)
raw | patch | inline | side by side (parent: 6cfaee4)
author | fredboy <fredboy@protonmail.com> | |
Sat, 25 May 2024 09:31:39 +0000 (16:31 +0700) | ||
committer | fredboy <fredboy@protonmail.com> | |
Sat, 25 May 2024 09:41:54 +0000 (16:41 +0700) |
up-version.sh | patch | blob | history |
diff --git a/up-version.sh b/up-version.sh
index 7637355e9d8a675c279272f2618a07d7514d8640..80fa78ebee352b6bae09cc1a4904dac8133c5379 100755 (executable)
--- a/up-version.sh
+++ b/up-version.sh
new_version_string=$(echo $new_version | sed 's/\(alpha\|beta\)\(.*\)/\1 \2/')
new_version_string=$(echo $new_version | sed 's/\(alpha\|beta\)\(.*\)/\1 \2/')
-sed -i 's/\(version\s=\s\)'"'"'.*'"'"'/\1'"'"''"$new_version"''"'"'/g' build.gradle
-sed -i 's/\(versionName\s\)\".*\"/\1\"'"$new_version"'\"/g' android/build.gradle
-sed -i 's/\(^\s*versionCode\s\)\([0-9]*\)/echo "\1$((\2+1))"/ge' android/build.gradle
-sed -i 's/\(public static final String VERSION = \)\".*\"/\1\"'"$new_version_string"'\"/' core/src/ru/deadsoftware/cavedroid/CaveGame.java
+sed -i 's/\(const val versionName = \)\".*\"/\1\"'"$new_version"'\"/g' buildSrc/src/main/kotlin/ApplicationInfo.kt
+sed -i 's/\(\s*const val versionCode = \)\([0-9]*\)/echo "\1$((\2+1))"/ge' buildSrc/src/main/kotlin/ApplicationInfo.kt
+sed -i 's/\(const val VERSION = \)\".*\"/\1\"'"$new_version_string"'\"/' core/src/main/kotlin/ru/deadsoftware/cavedroid/CaveGame.kt
-git add build.gradle android/build.gradle core/src/ru/deadsoftware/cavedroid/CaveGame.java
+git add buildSrc/src/main/kotlin/ApplicationInfo.kt core/src/main/kotlin/ru/deadsoftware/cavedroid/CaveGame.kt
git commit -m "Update version"
git tag "$new_version"
git commit -m "Update version"
git tag "$new_version"
+q
\ No newline at end of file