feat(version-schemes): add monotonic version scheme implementation #1705
+125
−8
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.
Description
Added a new version scheme for monotonic single number versions. e.g. v1 -> v2 -> v3 -> ...
Checklist
Code Changes
poetry alllocally to ensure this change passes linter check and testsDocumentation Changes
poetry doclocally to ensure the documentation pages renders correctlyExpected Behavior
In some scenarios, we have to use a single number as our version that increases as code progress. For these kind of verions that doesn't follow a 3 part section, I introduced a new version_scheme called
monotonicwhich increases the version by 1 in any situation.Furthermore, we can generate changelog for repos with monotonic tags.
Steps to Test This Pull Request
pip install https://github.com/YazdanRa/commitizen/releases/download/v4.10.0b1/commitizen-4.10.0.tar.gz.pyproject.tomlfile withversion_scheme = "monotonic"or use the--version-scheme=monotinicparam.Additional Context
#1704
I have added this feature for our own use, in some scenarios we have to use a monotonic version to be in sync with our registry.