mojombo/semver — Issue #5: Segment comparison misses certain scenarios
Author: serialseb
Created: 2011-12-12 17:13:15+00:00
State: open

Suggesting a clarification that ought to be in the text provided the below is accurate:

From reading the specification, when it comes to build or pre, there is no word on how to compare variable segment numbers.

Specifically, what ought to be the result of `1.0.0+build` compared to `1.0.0+build.1` and `1.0.0-pre` compared to `1.0.0-pre.beta`.

As the specification implies that when build is present it takes precedence over absence of build, and normal takes precendence over pre, I assume the following result:

1.0.0+build.1 < 1.0.0+build
1.0.0-alpha < 1.0.0-alpha.1

The examples however show that 1) is not correct, and should be `build < build.1`. The text ought to be clarified if that's indeed the desired outcome of builds.