Merge pull request #533 from nsacyber/v2_issue_531

Fix to build.gradle on Eclipse
This commit is contained in:
iadgovuser26 2023-06-15 11:09:54 -04:00 committed by GitHub
commit ff89d414f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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}"