Has there been a better proposal to semantic tags which makes organizing and sorting them easier?
Has there been a better proposal to semantic tags which makes organizing and sorting them easier?
Git has built in version sort, though it's not the default. GitHub shows tags in version sort order in the drop-down tag selection.
Here are some commands that use that sort order:
ls -v # Linux only.
ls | sort -V # Most modern OSes.
git tag | sort -V # Git tags in version order.
git tag --sort=v:refname # Same as above, it's a git builtin.
git config tag.sort v:refname # Set default sort order for `git tag`.
git config versionsort.suffix -pre # Make 1.2-pre1 sort before 1.2.
git config versionsort.suffix -rc # Now 1.2-pre1 < 1.2-rc1 < 1.2 < 1.2-patch1https://www.gnu.org/software/libc/manual/html_node/String_00...
(... well, it's copied and pasted into the tree but close enough)
[1]: https://calver.org/
[1] https://en.wikipedia.org/wiki/Perl_5_version_history
Just to be clear, I don't actually think this is a great solution, but is _is_ easy to sort.
I searched for a bit and found that github does this ( e.g. https://github.com/TryGhost/Ghost/tags ). Also there is a git config that sets this globally for the git cli: `git config --global tag.sort version:refname` ( found here: https://gist.github.com/loisaidasam/b1e6879f3deb495c22cc ). That's another git config going onto every machine I use...