Merge pull request #3296 from mcclure/live-without-git-2
Fix non-git build
This commit is contained in:
commit
cc0b5ae1a2
1 changed files with 12 additions and 3 deletions
|
@ -5,9 +5,18 @@ plugins {
|
|||
alias(libs.plugins.kotlin.parcelize)
|
||||
}
|
||||
|
||||
final def gitSha = providers.exec {
|
||||
commandLine('git', 'rev-parse', '--short=7', 'HEAD')
|
||||
// For constructing gitSha only
|
||||
def getGitSha = {
|
||||
try {
|
||||
providers.exec {
|
||||
commandLine 'git', 'rev-parse', 'HEAD'
|
||||
}.standardOutput.asText.get().trim()
|
||||
} catch (Exception e) {
|
||||
"unknown" // Try-catch is necessary for build to work on non-git distributions
|
||||
}
|
||||
}
|
||||
|
||||
final def gitSha = getGitSha()
|
||||
|
||||
// The app name
|
||||
final def APP_NAME = "Tusky"
|
||||
|
|
Loading…
Reference in a new issue