summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/android/app/build.gradle.kts11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/android/app/build.gradle.kts b/src/android/app/build.gradle.kts
index d44bb4c74..cb026211c 100644
--- a/src/android/app/build.gradle.kts
+++ b/src/android/app/build.gradle.kts
@@ -259,13 +259,20 @@ fun runGitCommand(command: List<String>): String {
259} 259}
260 260
261fun getGitVersion(): String { 261fun getGitVersion(): String {
262 val gitVersion = runGitCommand(listOf("git", "describe", "--always", "--long")) 262 val gitVersion = runGitCommand(
263 listOf(
264 "git",
265 "describe",
266 "--always",
267 "--long"
268 )
269 ).replace(Regex("(-0)?-[^-]+$"), "")
263 val versionName = if (System.getenv("GITHUB_ACTIONS") != null) { 270 val versionName = if (System.getenv("GITHUB_ACTIONS") != null) {
264 System.getenv("GIT_TAG_NAME") ?: gitVersion 271 System.getenv("GIT_TAG_NAME") ?: gitVersion
265 } else { 272 } else {
266 gitVersion 273 gitVersion
267 } 274 }
268 return versionName.replace(Regex("(-0)?-[^-]+$"), "").ifEmpty { "0.0" } 275 return versionName.ifEmpty { "0.0" }
269} 276}
270 277
271fun getGitHash(): String = 278fun getGitHash(): String =