Use different name for next version type prop
ci/woodpecker/push/gradle Pipeline was successful Details
ci/woodpecker/push/pages Pipeline was successful Details

This commit is contained in:
Johannes Frohnmeyer 2023-06-29 16:54:40 +02:00
parent 034d1b0237
commit 6d0036bad9
Signed by: Johannes
GPG Key ID: E76429612C2929F4
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ tasks.register("bumpVersion") {
if (!File(projectDir, ".git").exists()) throw IllegalStateException("Cannot bump without repository") if (!File(projectDir, ".git").exists()) throw IllegalStateException("Cannot bump without repository")
if (isRelease) throw IllegalStateException("Cannot bump while 'release' is set") if (isRelease) throw IllegalStateException("Cannot bump while 'release' is set")
if (!project.hasProperty("versionType")) throw IllegalStateException("bumpVersion requires you to set -PversionType=release|beta|alpha") if (!project.hasProperty("versionType")) throw IllegalStateException("bumpVersion requires you to set -PversionType=release|beta|alpha")
val vt = VersionType.byName(prop("versionType")) ?: throw IllegalStateException("Unrecognized version type") val vt = prop("nextVersionType").run { VersionType.byName(this) ?: throw IllegalStateException("Unrecognized version type: $this") }
val name = nextRelease!!.withType(vt).toString() val name = nextRelease!!.withType(vt).toString()
Git.open(projectDir).use { git -> Git.open(projectDir).use { git ->
git.tag().setName(name).call() git.tag().setName(name).call()