Browse Source

Allow build on systems without git (#2514)

Set git revision to "unknown" if git not available.
pull/2525/head
mcclure 4 years ago committed by GitHub
parent
commit
4159826f26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      app/build.gradle

10
app/build.gradle

@ -7,9 +7,13 @@ apply from: "../instance-build.gradle"
def getGitSha = {
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-parse', '--short', 'HEAD'
standardOutput = stdout
try {
exec {
commandLine 'git', 'rev-parse', '--short', 'HEAD'
standardOutput = stdout
}
} catch (Exception e) {
return "unknown"
}
return stdout.toString().trim()
}

Loading…
Cancel
Save