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

Fix failure to sort properly with prefix, sort double numbers (#43 #44).

Open john-tipper opened this issue 6 years ago • 1 comments

Tags were not being sorted properly if there was a prefix, as the numerical sort included the prefix in the first sort field. We grep this out via a capture group of the remainder of the tag, sort, then add the prefix back in if required. This also fixes the issue with double numbers.

The version being reported in get to the user (at the end of version-get()) was using an unsorted list of tags, so use the new sorted list for actually getting the version.

john-tipper avatar Nov 22 '19 12:11 john-tipper

Hi!

Any chance on merging this?

KrystianOcado avatar Jan 13 '25 17:01 KrystianOcado