Skip to content
This repository has been archived by the owner on Apr 14, 2024. It is now read-only.

Commit

Permalink
Don't tag on every build
Browse files Browse the repository at this point in the history
  • Loading branch information
yschimke committed Dec 27, 2021
1 parent 77ac672 commit f264675
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,14 @@ fun Project.booleanProperty(name: String) = this.findProperty(name).toString().t
fun Project.booleanEnv(name: String) = (System.getenv(name) as String?).toString().toBoolean()

task("tagRelease") {
val tagName = versioning.info.nextVersion() ?: throw IllegalStateException("unable to compute tag name")
exec {
commandLine("git", "tag", tagName)
}
exec {
commandLine("git", "push", "origin", "refs/tags/$tagName")
doLast {
val tagName = versioning.info.nextVersion() ?: throw IllegalStateException("unable to compute tag name")
exec {
commandLine("git", "tag", tagName)
}
exec {
commandLine("git", "push", "origin", "refs/tags/$tagName")
}
}
}

Expand Down

0 comments on commit f264675

Please sign in to comment.