diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2024-02-08 23:03:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-08 23:03:32 +0100 |
commit | 71e59bdcd8b1fd6898086ae9cbc11bdd137b5f12 (patch) | |
tree | 5aaa2e8112cdfba956c3feb2ea57de5d3a320b57 | |
parent | Merge pull request #12903 from liamwhite/const-offset (diff) | |
parent | android: Fix regex for git version (diff) | |
download | yuzu-71e59bdcd8b1fd6898086ae9cbc11bdd137b5f12.tar yuzu-71e59bdcd8b1fd6898086ae9cbc11bdd137b5f12.tar.gz yuzu-71e59bdcd8b1fd6898086ae9cbc11bdd137b5f12.tar.bz2 yuzu-71e59bdcd8b1fd6898086ae9cbc11bdd137b5f12.tar.lz yuzu-71e59bdcd8b1fd6898086ae9cbc11bdd137b5f12.tar.xz yuzu-71e59bdcd8b1fd6898086ae9cbc11bdd137b5f12.tar.zst yuzu-71e59bdcd8b1fd6898086ae9cbc11bdd137b5f12.zip |
-rw-r--r-- | src/android/app/build.gradle.kts | 11 |
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 = |