Skip to content

Commit

Permalink
Execute git command in current project dir to work with composite builds
Browse files Browse the repository at this point in the history
  • Loading branch information
bmalinowsky committed Jul 28, 2024
1 parent 449ff9c commit 8479f52
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ dependencies {
testImplementation "org.junit.jupiter:junit-jupiter:${junitJupiterVersion}"
}

def gitHash = 'git rev-parse --verify --short HEAD'.execute().text.trim()

def gitHash = "git -C $projectDir rev-parse --verify --short HEAD".execute().text.trim()
def buildDate = java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss z")
.withZone(ZoneId.of("UTC"))
.format(Instant.now())
Expand Down

0 comments on commit 8479f52

Please sign in to comment.