-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adding prerelease version increments (#397)
**Background Summary** This PR adds support for incrementing prerelease versions by default, if it ends in a number. Currently, if a prerelease version is incremented, the prerelease qualifier is simply dropped. E.g. `1.0.0-RC1` will be incremented to `1.0.0`. After this merge, `1.0.0-RC1` will be incremented to `1.0.0-RC2`, but prerelease versions without a version number will behave as before: `1.0.0-alpha` will be incremented to `1.0.0`. **New/Updated Versioning Strategies** `Next` (**updated - breaking change**): Will now increment prerelease versions, unlike in the past. So `1.0-RC1` will become `1.0-RC2`. Previously `1.0-RC1` would become `1.1`. `NextStable` (**new**): The same as `Next` except that it excludes any prerelease versions. So `1.0.0-RC1` becomes `1.0.0`
- Loading branch information
Showing
8 changed files
with
290 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ target | |
project/target | ||
.idea | ||
.idea_modules | ||
.bsp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,41 @@ | ||
$ exec git init . | ||
# Test Suite Preparation | ||
$ exec git init . | ||
> update | ||
$ exec git add . | ||
$ exec git commit -m init | ||
> reload | ||
|
||
> update | ||
# SCENARIO: When no release versions are specified in the release command | ||
# TEST: Should fail to release if "with-defaults" is not specified | ||
-> release | ||
|
||
$ exec git add . | ||
$ exec git commit -m init | ||
# TEST: Should succeed if "with-defaults" is specified | ||
> release with-defaults | ||
|
||
> reload | ||
# SCENARIO: When default bumping strategy is used | ||
# Test Scenario Preparation | ||
> 'release release-version 0.9.9 next-version 1.0.0-RC1-SNAPSHOT' | ||
> reload | ||
> checkContentsOfVersionSbt 1.0.0-RC1-SNAPSHOT | ||
|
||
# TEST: Snapshot version should be correctly set | ||
> release with-defaults | ||
> checkContentsOfVersionSbt 1.0.0-RC2-SNAPSHOT | ||
|
||
# TEST: Release version should be correctly set | ||
$ exec git reset --hard HEAD~1 | ||
> reload | ||
> checkContentsOfVersionSbt 1.0.0-RC1 | ||
|
||
# SCENARIO: When NextStable bumping strategy is used | ||
# TEST: Snapshot version should be correctly set | ||
$ exec git reset --hard HEAD~1 | ||
> set releaseVersionBump := sbtrelease.Version.Bump.NextStable | ||
> release with-defaults | ||
> checkContentsOfVersionSbt 1.0.1-SNAPSHOT | ||
|
||
# TEST: Release version should be correctly set | ||
$ exec git reset --hard HEAD~1 | ||
> reload | ||
> checkContentsOfVersionSbt 1.0.0 | ||
|
||
-> release | ||
> release with-defaults |
Oops, something went wrong.