mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-18 03:48:08 +00:00
Do not append commits count and hash to release when on tag
This commit is contained in:
parent
95849162de
commit
f7a37bfc81
1 changed files with 5 additions and 1 deletions
|
|
@ -43,7 +43,11 @@ task getGitVersion() {
|
|||
standardOutput = gitCommitHash
|
||||
}
|
||||
|
||||
gitVersion = gitVersionStream.toString().trim() + "." + gitCommitsCount.toString().trim() + "+" + gitCommitHash.toString().trim()
|
||||
if (gitCommitsCount.toString().toInteger() == 0) {
|
||||
gitVersion = gitVersionStream.toString().trim()
|
||||
} else {
|
||||
gitVersion = gitVersionStream.toString().trim() + "." + gitCommitsCount.toString().trim() + "+" + gitCommitHash.toString().trim()
|
||||
}
|
||||
println("Git version: " + gitVersion)
|
||||
} catch (Exception e) {
|
||||
println("Git not found")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue