mirror of
https://github.com/nsacyber/HIRS.git
synced 2024-12-19 21:17:59 +00:00
Fix to build.gradle on Eclipse
This commit is contained in:
parent
1d00339a78
commit
868ff8fe8c
11
build.gradle
11
build.gradle
@ -26,11 +26,12 @@ def buildTime = { ->
|
||||
}
|
||||
|
||||
def gitHash = { ->
|
||||
def gitProcess = 'git rev-parse --short HEAD'.execute();
|
||||
gitProcess.waitFor();
|
||||
def shortHash = gitProcess.text.trim();
|
||||
def gitHash = shortHash.substring(0, shortHash.length() - 2);
|
||||
return gitHash;
|
||||
def stdout = new ByteArrayOutputStream()
|
||||
exec {
|
||||
commandLine 'git', 'rev-parse', '--short', 'HEAD'
|
||||
standardOutput = stdout
|
||||
}
|
||||
return stdout.toString().trim()
|
||||
}
|
||||
|
||||
project.ext["jarVersion"] = "${projectVersion}.${buildTime}.${gitHash}"
|
||||
|
Loading…
Reference in New Issue
Block a user