Skip to content

Commit

Permalink
Merge fc8ad4a into f0300dc
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-haubrich committed Oct 10, 2019
2 parents f0300dc + fc8ad4a commit 6bfc723
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions build.gradle
Expand Up @@ -650,13 +650,16 @@ def getGitCommit() {
def dotGit = new File("$projectDir/.git")
if (!dotGit.isDirectory()) return 'non-git build'

def projectDir = dotGit.getParentFile()
def cmd = 'git describe --always --tags --dirty=+'
def proc = cmd.execute()
def proc = cmd.execute(null, projectDir)
proc.waitForOrKill(10 * 1000)

def gitCommit = proc.text.trim()
assert !gitCommit.isEmpty()

def srCmd = 'git symbolic-ref --short HEAD'
def srProc = srCmd.execute()
def srProc = srCmd.execute(null, projectDir)
srProc.waitForOrKill(10 * 1000)
if (srProc.exitValue() == 0) {
// Only add the information if the git command was
Expand Down

0 comments on commit 6bfc723

Please sign in to comment.