Skip to content

Commit

Permalink
Trim commit when used as pom tag.
Browse files Browse the repository at this point in the history
Signed-off-by: Kenneth J. Shackleton <[email protected]>
  • Loading branch information
kennethshackleton committed May 3, 2024
1 parent 20e19f6 commit cdcfbf7
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 cdcfbf7

Please sign in to comment.