mirror of
https://github.com/semver/semver.git
synced 2026-07-11 06:53:03 -05:00
[GH-ISSUE #239] Which version is greater? beta or betas #1897
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @hartungstenio on GitHub (Jan 6, 2015).
Original GitHub issue: https://github.com/semver/semver/issues/239
I was dealing with some implementations, and found a really weird case, which left me thinking:
Which version is greater? 1.0.0-beta or 1.0.0-betas
Both of them have the same amount of pre-release identifiers, but one is longer.
Which one of those is the newest version?
@DavidFichtmueller commented on GitHub (Jan 6, 2015):
I think the rules are pretty clear on this one:
1.0.0-beta < 1.0.0-betas
Rule 9: "A pre-release version MAY be denoted by appending a hyphen and a series of dot separated identifiers. [...]"
Rule 11: "[...] identifiers with letters or hyphens are compared lexically in ASCII sort order"
It would be really helpful to have a web app/web services/library that would do the ordering according to the rules, so one could check the ordering for questions like this.
@hartungstenio commented on GitHub (Jan 6, 2015):
@DavidFichtmueller actually, I was creating exactly that kind of library. It is more like a "Learn Java" thing, since I begun to work with Java just now. But it is a library capable of parsing and comparing versions (actually just parsing since I'm coding the comparison as I write this comment just now).
Just don't expect too much of it right now, since I'm still learning Java. It should be usable some time in the future.
@DavidFichtmueller commented on GitHub (Jan 6, 2015):
Wow, cool thing. I guess this could be useful to a lot of people. And it is a great project to learn a programming language as well. Happy Coding!
@ghost commented on GitHub (Jun 13, 2015):
@hartungstenio your link is broken...
@hartungstenio commented on GitHub (Jun 15, 2015):
@Computer-Whiz123 sorry. I changed my BitBucket username. The current link is: https://bitbucket.org/hartungstenio/semver-j
@jwdonahue commented on GitHub (Dec 8, 2017):
@hartungstenio, unless you have further questions or comments, please close this issue at your earliest possible convenience.