aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/android/app
diff options
context:
space:
mode:
authort895 <[email protected]>2024-02-08 14:24:15 -0500
committert895 <[email protected]>2024-02-08 14:24:15 -0500
commit0a1283f94fb2b0b05034c75b93337d263d3ee295 (patch)
tree5aaa2e8112cdfba956c3feb2ea57de5d3a320b57 /src/android/app
parentf049453dd6cf729d4acdb703e3624abe8c855874 (diff)
downloadyuzu-mainline-0a1283f94fb2b0b05034c75b93337d263d3ee295.tar.gz
yuzu-mainline-0a1283f94fb2b0b05034c75b93337d263d3ee295.zip
android: Fix regex for git version
Diffstat (limited to 'src/android/app')
-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 {
}
fun getGitVersion(): String {
- val gitVersion = runGitCommand(listOf("git", "describe", "--always", "--long"))
+ val gitVersion = runGitCommand(
+ listOf(
+ "git",
+ "describe",
+ "--always",
+ "--long"
+ )
+ ).replace(Regex("(-0)?-[^-]+$"), "")
val versionName = if (System.getenv("GITHUB_ACTIONS") != null) {
System.getenv("GIT_TAG_NAME") ?: gitVersion
} else {
gitVersion
}
- return versionName.replace(Regex("(-0)?-[^-]+$"), "").ifEmpty { "0.0" }
+ return versionName.ifEmpty { "0.0" }
}
fun getGitHash(): String =