use sorting option of git command, it allows to sort tags by date. sort -r doesn't work properly in all cases, e.g. if there are two tags exist 0.3.9 and 0.3.68, then sort -r will return 0.3.9 as first tag
grep "^v[0-9]*\.[0-9]*\.[0-9]" doesn't make sense here, git tag -l --sort=-committerdate returns only the list of tags
git
command, it allows to sort tags by date.sort -r
doesn't work properly in all cases, e.g. if there are two tags exist0.3.9
and0.3.68
, thensort -r
will return0.3.9
as first taggrep "^v[0-9]*\.[0-9]*\.[0-9]"
doesn't make sense here,git tag -l --sort=-committerdate
returns only the list of tags