git-semver
git-semver copied to clipboard
Enable fetching the largest version instead of just the latest version
Sometimes - we have to go back to a previous major version and patch it. This becomes the latest 'tag'. When executed in CI/CD this causes an issue since the calculated new version will likely exist in tags - making it incorrect and likely to fail the tagging process.
.e.g tags in date order are:
v6.8.0
v3.2.8 # historical version with a patch fix gets inserted at the end
then
git commit -m "[minor] stuff"
will attempt to tag v2.9.0
- which already exists in our tags.
Suggestion:
git-semver -sort-on version -target minor
properly calculates the tag
v6.9.0
This enables recent patches to continue as planned without affecting the ongoing tagging process. Since the tagging code is encapsulted in this module - there is no reasonable amount of complexity we can add to get around it.