markchalloner / git-semver

Git plugin for Semantic Versioning
MIT License
382 stars 43 forks source link

"git semver get" does not fetch the right tag #45

Open stesix opened 5 years ago

stesix commented 5 years ago

If I generate a bunch of pre-release tags and then create a release tag, the git semver get is not able to fetch the correct last generated tag. e.g.

test env preparation

mkdir test && cd test && git init
echo 'test' > test
git add test
git commit -m "test"

test

git tag 1.0.0
git tag 1.0.1-alpha
git tag 1.0.1-beta
git tag 1.0.1-rc
git tag 1.0.1

git semver get

I'd expect to see 1.0.1 as a result but I'm getting 1.0.1-rc which IMHO is not correct.