From cdcfbf72ca92e73204b4c2c2cac84ba09111a533 Mon Sep 17 00:00:00 2001 From: "Kenneth J. Shackleton" Date: Fri, 3 May 2024 07:36:22 +0100 Subject: [PATCH] Trim commit when used as pom tag. Signed-off-by: Kenneth J. Shackleton --- buildSrc/src/main/kotlin/SelektExtensions.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/kotlin/SelektExtensions.kt b/buildSrc/src/main/kotlin/SelektExtensions.kt index 2ab82d9c8b..13cc0a105c 100644 --- a/buildSrc/src/main/kotlin/SelektExtensions.kt +++ b/buildSrc/src/main/kotlin/SelektExtensions.kt @@ -30,7 +30,7 @@ fun NamedDomainObjectContainer.release(configure: T.() -> Unit) = getByNa fun Project.gitCommit(): Provider = providers.exec { commandLine("git", "rev-parse", "HEAD") -}.standardOutput.asText +}.standardOutput.asText.map { it.trim() } fun Project.gitCommitShort(): Provider = providers.exec { commandLine("git", "rev-parse", "--short", "HEAD")