Create a tag in git called 1.0.0.
Make 5 more commits.
Run git describe --tags. Output will be something like 1.0.0-5-feedcat.
Make 7 more commits, and run it again. Output will be something like 1.0.0-12-deadbeef.
It seems like 1.0.0-12-deadbeef should be > 1.0.0-5-feedcat. However, since only periods separate prerelease identifiers, and any identifier with hyphens is compared alphabetically, this won't be the case.
The fact that the semver 2.0 spec is not compatible with git describe --tags is not so great, in my opinion.
One possible solution would be to split prerelease identifiers by both periods and hyphens.
One bit of oddness that might result is that 1.0.0-asdf-1 would be equal to 1.0.0-asdf.1. But otherwise, it looks like all the existing semantics would be equivalent.
Create a tag in git called
1.0.0.Make 5 more commits.
Run
git describe --tags. Output will be something like1.0.0-5-feedcat.Make 7 more commits, and run it again. Output will be something like
1.0.0-12-deadbeef.It seems like
1.0.0-12-deadbeefshould be >1.0.0-5-feedcat. However, since only periods separate prerelease identifiers, and any identifier with hyphens is compared alphabetically, this won't be the case.The fact that the semver 2.0 spec is not compatible with
git describe --tagsis not so great, in my opinion.One possible solution would be to split prerelease identifiers by both periods and hyphens.
One bit of oddness that might result is that
1.0.0-asdf-1would be equal to1.0.0-asdf.1. But otherwise, it looks like all the existing semantics would be equivalent.