Commit f7a37bfc authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Do not append commits count and hash to release when on tag

parent 95849162
Pipeline #11459 passed with stage
in 2 minutes and 2 seconds
......@@ -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")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment