diff --git a/convention/src/main/kotlin/jf.autoversion.gradle.kts b/convention/src/main/kotlin/jf.autoversion.gradle.kts index 31e34f2..3037377 100644 --- a/convention/src/main/kotlin/jf.autoversion.gradle.kts +++ b/convention/src/main/kotlin/jf.autoversion.gradle.kts @@ -65,7 +65,7 @@ tasks.register("bumpVersion") { if (!File(projectDir, ".git").exists()) throw IllegalStateException("Cannot bump without repository") 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") - 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() Git.open(projectDir).use { git -> git.tag().setName(name).call()