com.rallyhealth.sbt.semver.level.rule.InitialDevelopmentRule.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bleep-plugin-git-versioning_3 Show documentation
Show all versions of bleep-plugin-git-versioning_3 Show documentation
A bleeping fast scala build tool!
The newest version!
package bleep.plugin.semver.level.rule
import bleep.plugin.semver.level.{SemVerEnforcementLevel, SemVerLevelRule}
import bleep.plugin.versioning.SemVerReleaseType.Major
import bleep.plugin.versioning.SemanticVersion
/** @see
* http://semver.org/#spec-item-4
*/
case class InitialDevelopmentRule(current: SemanticVersion) extends SemVerLevelRule {
override def calcLevel(): Option[SemVerEnforcementLevel] =
if (current.isInitialDevVersion) {
Some(MajorChangesAllowedForInitialDevelopment)
} else {
None
}
}
/** @see
* http://semver.org/#spec-item-4
*/
case object MajorChangesAllowedForInitialDevelopment
extends SemVerEnforcementLevel(
releaseType = Major,
explanation = "Major version zero (0.y.z) is for initial development. Anything may change at any time. The public API should not be considered stable."
)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy