Commit 9b02b488 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Updated build.gradle to use new semantic versioning

parent cc77a5e8
Pipeline #8795 passed with stage
in 1 minute and 55 seconds
......@@ -24,15 +24,26 @@ static def isLocalAarAvailable() {
}
task getGitVersion() {
def gitVersion = "4.1"
def gitVersion = "4.2"
def gitVersionStream = new ByteArrayOutputStream()
def gitCommitsCount = new ByteArrayOutputStream()
def gitCommitHash = new ByteArrayOutputStream()
try {
exec {
executable "git" args "describe", "--always"
executable "git" args "describe", "--abbrev=0"
standardOutput = gitVersionStream
}
gitVersion = gitVersionStream.toString().trim()
exec {
executable "git" args "rev-list", gitVersionStream.toString().trim() + "..HEAD", "--count"
standardOutput = gitCommitsCount
}
exec {
executable "git" args "rev-parse", "--short", "HEAD"
standardOutput = gitCommitHash
}
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