Who knows if this works
This commit is contained in:
@@ -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()}
|
||||
|
||||
Reference in New Issue
Block a user