Include git revision and build number

This commit is contained in:
Andrew Steinborn
2018-09-03 21:02:11 -04:00
parent 01be081bda
commit 3b5d20e62d
2 changed files with 15 additions and 1 deletions

View File

@@ -27,6 +27,17 @@ allprojects {
return os.toString().trim()
}
}
getCurrentShortRevision = {
new ByteArrayOutputStream().withStream { os ->
exec {
executable = "git"
args = ["rev-parse", "HEAD"]
standardOutput = os
}
return os.toString().trim().substring(0, 8)
}
}
}
repositories {