mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-15 07:37:03 +05:30
refactor(build): defer semver parsing to task execution
This commit is contained in:
parent
1ab1520c60
commit
38f71460f0
1 changed files with 5 additions and 5 deletions
|
@ -70,27 +70,27 @@ class VersioningPlugin : Plugin<Project> {
|
||||||
val version = versionName.map(Version::parse)
|
val version = versionName.map(Version::parse)
|
||||||
tasks.register<VersioningTask>("clearPreRelease") {
|
tasks.register<VersioningTask>("clearPreRelease") {
|
||||||
description = "Remove the pre-release suffix from the version"
|
description = "Remove the pre-release suffix from the version"
|
||||||
semverString.set(version.get().toStableVersion().toString())
|
semverString.set(version.map(Version::toStableVersion).map(Version::toString))
|
||||||
propertyFile.set(propFile)
|
propertyFile.set(propFile)
|
||||||
}
|
}
|
||||||
tasks.register<VersioningTask>("bumpMajor") {
|
tasks.register<VersioningTask>("bumpMajor") {
|
||||||
description = "Increment the major version"
|
description = "Increment the major version"
|
||||||
semverString.set(version.get().nextMajorVersion().toString())
|
semverString.set(version.map(Version::nextMajorVersion).map(Version::toString))
|
||||||
propertyFile.set(propFile)
|
propertyFile.set(propFile)
|
||||||
}
|
}
|
||||||
tasks.register<VersioningTask>("bumpMinor") {
|
tasks.register<VersioningTask>("bumpMinor") {
|
||||||
description = "Increment the minor version"
|
description = "Increment the minor version"
|
||||||
semverString.set(version.get().nextMinorVersion().toString())
|
semverString.set(version.map(Version::nextMinorVersion).map(Version::toString))
|
||||||
propertyFile.set(propFile)
|
propertyFile.set(propFile)
|
||||||
}
|
}
|
||||||
tasks.register<VersioningTask>("bumpPatch") {
|
tasks.register<VersioningTask>("bumpPatch") {
|
||||||
description = "Increment the patch version"
|
description = "Increment the patch version"
|
||||||
semverString.set(version.get().nextPatchVersion().toString())
|
semverString.set(version.map(Version::nextPatchVersion).map(Version::toString))
|
||||||
propertyFile.set(propFile)
|
propertyFile.set(propFile)
|
||||||
}
|
}
|
||||||
tasks.register<VersioningTask>("bumpSnapshot") {
|
tasks.register<VersioningTask>("bumpSnapshot") {
|
||||||
description = "Increment the minor version and add the `SNAPSHOT` suffix"
|
description = "Increment the minor version and add the `SNAPSHOT` suffix"
|
||||||
semverString.set(version.get().nextMinorVersion("SNAPSHOT").toString())
|
semverString.set(version.map { it.nextMinorVersion("SNAPSHOT") }.map(Version::toString))
|
||||||
propertyFile.set(propFile)
|
propertyFile.set(propFile)
|
||||||
}
|
}
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue