Who knows if this works

This commit is contained in:
mcrcortex
2025-01-05 08:31:34 +10:00
parent 73cc91fa0d
commit 67347048b5

View File

@@ -24,6 +24,7 @@ repositories {
def gitCommitHash = { -> def gitCommitHash = { ->
try {
def stdout = new ByteArrayOutputStream() def stdout = new ByteArrayOutputStream()
ExecResult result = exec () -> { ExecResult result = exec () -> {
commandLine 'git', 'rev-parse', '--short', 'HEAD' commandLine 'git', 'rev-parse', '--short', 'HEAD'
@@ -36,6 +37,10 @@ def gitCommitHash = { ->
} else { } else {
return stdout.toString().trim(); return stdout.toString().trim();
} }
} catch (Exception e) {
e.printStackTrace()
return "<UnknownCommit>";
}
} }
def buildtime = {System.currentTimeSeconds()} def buildtime = {System.currentTimeSeconds()}