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 8d32de3 commit 1f37bc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ dependencies {
runtimeOnly 'org.slf4j:slf4j-simple:2.0.9'
}

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 1f37bc2

Please sign in to comment.