git-semver icon indicating copy to clipboard operation
git-semver copied to clipboard

Enable fetching the largest version instead of just the latest version

Open decoded4620 opened this issue 8 months ago • 1 comments

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.

decoded4620 avatar Jun 09 '24 17:06 decoded4620