Use different name for next version type prop
This commit is contained in:
parent
034d1b0237
commit
6d0036bad9
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue