Skip to content

Commit

Permalink
Merge pull request #521 from kennethshackleton/trim-tag
Browse files Browse the repository at this point in the history
Trim git commit when used as pom tag.
  • Loading branch information
kennethshackleton authored May 3, 2024
2 parents 20e19f6 + cdcfbf7 commit ba5717c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/SelektExtensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fun <T> NamedDomainObjectContainer<T>.release(configure: T.() -> Unit) = getByNa

fun Project.gitCommit(): Provider<String> = providers.exec {
commandLine("git", "rev-parse", "HEAD")
}.standardOutput.asText
}.standardOutput.asText.map { it.trim() }

fun Project.gitCommitShort(): Provider<String> = providers.exec {
commandLine("git", "rev-parse", "--short", "HEAD")
Expand Down

0 comments on commit ba5717c

Please sign in to comment.