build: support a release candidate version #2543
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes
Support release candidate info in the version (e.g.
1.0.0-rc.1
).And adding support for auto incrementing from the previous release candidate version after merging into main (instead of bumping just the patch version)
Below shows the version numbers in different scenarios:
Main branch - 231 commits past tag 0.13.1
Tag 1.0.0-rc.1
Main branch - 2 commits past tag 1.0.0-rc.1
Tag: 1.0.0
Main branch - 1 commit past tag 1.0.0
Types of changes
Paste Link to the issue
Checklist
cargo fmt
as mentioned in CODING_GUIDELINEScargo clippy
as mentioned in CODING_GUIDELINESFurther comments
Whilst editing the version.sh script, it has become clear that due to the complex version requires, the version.sh will have to be replaced by another solution which is more "testable" and easier to maintain. Ideally existing tooling could be used, however it still must meet the auto versioning requirements.