You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
Hmm versionPolicyIntention seems to have double duties. When used in versionPolicyCheck it need to be BinaryCompatible to pass check on 1.1.0-SNAPSHOT. When used in ReleaseVersion.fromCompatibility it needs to be BinaryAndSourceCompatible to so that the release is 1.1.0.
So I guess the issue is not where releaseStepTask(setAndCommitNextCompatibilityIntention) occurs but rather releaseVersion should always be ReleaseVersion.fromCompatibility(BinaryAndSourceCompatible).
steinybot
changed the title
Shouldn't versionPolicyIntention be reset before setReleaseVersion for sbt-release?
Shouldn't releaseVersion always be ReleaseVersion.fromCompatibility(BinaryAndSourceCompatible) for sbt-release?
Apr 9, 2024
Is this really required? Would it be possible to keep the version 1.0.1-SNAPSHOT until the next release process? Thus, setReleaseVersion would use ReleaseVersion.fromCompatibility(versionPolicyIntention.value) and produce version 1.1.0 in your example.
Otherwise, if your workflow needs the version to be 1.1.0-SNAPSHOT, then I think you could even use the default releaseVersion (without using ReleaseVersion.fromCompatibility at all), no?
sbt-release
has thesetNextVersion
release step which is where we loosly decide what the next version should be. For example, releasing1.0.0
will set the next version to1.0.1-SNAPSHOT
.version
is always the next version to release (with aSNAPSHOT
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 asBinaryCompatible
b) and bump the
version
such as1.1.0-SNAPSHOT
Now if we were to run
release
in this state thenReleaseVersion.fromCompatibility(versionPolicyIntention.value)
is going to bump the minor again and we will end up releasing1.2.0
instead of1.1.0
.So shouldn't
releaseStepTask(setAndCommitNextCompatibilityIntention)
appear beforesetReleaseVersion
?The text was updated successfully, but these errors were encountered: