From: fredboy Date: Sat, 25 May 2024 09:31:39 +0000 (+0700) Subject: Update version script X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;ds=inline;p=cavedroid.git Update version script --- diff --git a/up-version.sh b/up-version.sh index 7637355..80fa78e 100755 --- a/up-version.sh +++ b/up-version.sh @@ -4,12 +4,12 @@ new_version=$1 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" +q \ No newline at end of file