fix(autoversion): add missing hyphen
This commit is contained in:
parent
997c3f80a9
commit
fcaf3ed19c
@ -18,7 +18,7 @@ data class SemanticVersion(val major: Int, val minor: Int, val patch: Int, val t
|
||||
|
||||
override fun toString(): String {
|
||||
return "$major.$minor.$patch" + when (type) {
|
||||
VersionType.RELEASE -> typeSupplement ?: ""
|
||||
VersionType.RELEASE -> typeSupplement?.let { "-$it" } ?: ""
|
||||
else -> "-${type.semanticName}" + if(typeSupplement != null) ".$typeSupplement" else ""
|
||||
} + if (build == null) "" else "+$build"
|
||||
}
|
||||
@ -34,6 +34,7 @@ data class SemanticVersion(val major: Int, val minor: Int, val patch: Int, val t
|
||||
}
|
||||
|
||||
fun withType(versionType: VersionType, typeSupplement: String? = null) = SemanticVersion(major, minor, patch, versionType, typeSupplement, build)
|
||||
fun withBuild(build: String?) = SemanticVersion(major, minor, patch, type, typeSupplement, build)
|
||||
|
||||
companion object {
|
||||
private val identifier = Regex("[a-zA-Z1-9][a-zA-Z0-9]*")
|
||||
|
@ -38,7 +38,7 @@ if (File(projectDir, ".git").exists()) {
|
||||
.map { msg -> CommitType.from(msg) { logger.warn(it) } }
|
||||
.max { o1, o2 -> o1.compareTo(o2) }
|
||||
.getOrDefault(CommitType.FIX)
|
||||
nextRelease = parsedVersion.incrementBy(type)
|
||||
nextRelease = parsedVersion.incrementBy(type, nprop("buildClassifier"))
|
||||
}
|
||||
} else {
|
||||
changelog += "Commits after inception:\n"
|
||||
|
Loading…
Reference in New Issue
Block a user