Do not append commits count and hash to release when on tag
This commit is contained in:
parent
076ceff33e
commit
66b5f2a046
1 changed files with 5 additions and 1 deletions
|
@ -43,7 +43,11 @@ task getGitVersion() {
|
||||||
standardOutput = gitCommitHash
|
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)
|
println("Git version: " + gitVersion)
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
println("Git not found")
|
println("Git not found")
|
||||||
|
|
Loading…
Reference in a new issue