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