Skip to content

Commit

Permalink
Build: Updated Publish Archives task
Browse files Browse the repository at this point in the history
  • Loading branch information
rozza committed Jan 12, 2023
1 parent 013d09f commit 3a33e2f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,15 @@ val gitVersion: String by lazy {
describeStdOut.toString().substring(1).trim()
}

val gitDiffNameOnly: String by lazy {
val describeStdOut = ByteArrayOutputStream()
exec {
commandLine = listOf("git", "diff", "--name-only")
standardOutput = describeStdOut
}
describeStdOut.toString().replaceIndent(" - ")
}

buildConfig {
className("Versions")
packageName("com.mongodb.kafka.connect")
Expand Down Expand Up @@ -377,6 +386,9 @@ tasks.register("publishArchives") {
|
| $version != $gitVersion
|
| Modified Files:
|$gitDiffNameOnly
|
| The project version does not match the git tag.
|""".trimMargin()
throw GradleException(cause)
Expand Down

0 comments on commit 3a33e2f

Please sign in to comment.