Merge pull request #256 from aminecmi/fdroid/build
Fixes #254 and #255.
This commit is contained in:
commit
f0d4b63a97
@ -2,7 +2,15 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def gitVersion() {
|
def gitVersion() {
|
||||||
def process = 'git describe --contains HEAD'.execute()
|
def process
|
||||||
|
def maybeTagOfCurrentCommit = 'git describe --contains HEAD'.execute()
|
||||||
|
if (maybeTagOfCurrentCommit.text.isEmpty()) {
|
||||||
|
println "No tag on current commit. Will take the latest one."
|
||||||
|
process = "git for-each-ref refs/tags --sort=-authordate --format='%(refname:short)' --count=1".execute()
|
||||||
|
} else {
|
||||||
|
println "Tag found on current commit"
|
||||||
|
process = 'git describe --contains HEAD'.execute()
|
||||||
|
}
|
||||||
return process.text.replaceAll("'", "").substring(1).replaceAll("\\.", "").trim()
|
return process.text.replaceAll("'", "").substring(1).replaceAll("\\.", "").trim()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user