sbt-release has the setNextVersion release step which is where we loosly decide what the next version should be. For example, releasing 1.0.0 will set the next version to 1.0.1-SNAPSHOT. version is always the next version to release (with a SNAPSHOT qualifier) which is a requirement for MiMa.
We run versionPolicyCheck in CI so any PR with breaking changes needs to:
a) set versionPolicyIntention to something else such as BinaryCompatible
b) and bump the version such as 1.1.0-SNAPSHOT
Now if we were to run release in this state then ReleaseVersion.fromCompatibility(versionPolicyIntention.value) is going to bump the minor again and we will end up releasing 1.2.0 instead of 1.1.0.
So shouldn't releaseStepTask(setAndCommitNextCompatibilityIntention) appear before setReleaseVersion?
sbt-releasehas thesetNextVersionrelease step which is where we loosly decide what the next version should be. For example, releasing1.0.0will set the next version to1.0.1-SNAPSHOT.versionis always the next version to release (with aSNAPSHOTqualifier) which is a requirement for MiMa.We run
versionPolicyCheckin CI so any PR with breaking changes needs to:a) set
versionPolicyIntentionto something else such asBinaryCompatibleb) and bump the
versionsuch as1.1.0-SNAPSHOTNow if we were to run
releasein this state thenReleaseVersion.fromCompatibility(versionPolicyIntention.value)is going to bump the minor again and we will end up releasing1.2.0instead of1.1.0.So shouldn't
releaseStepTask(setAndCommitNextCompatibilityIntention)appear beforesetReleaseVersion?