Who knows if this works
This commit is contained in:
@@ -24,8 +24,9 @@ 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'
|
||||||
standardOutput = stdout
|
standardOutput = stdout
|
||||||
ignoreExitValue = true
|
ignoreExitValue = true
|
||||||
@@ -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()}
|
||||||
|
|||||||
Reference in New Issue
Block a user