adamreeve / semver.net

Semantic versioning for .NET
MIT License
117 stars 22 forks source link

Add optional build metadata comparison #29

Open lvermeulen opened 7 years ago

lvermeulen commented 7 years ago

The semver 2.0 spec (section 10) states:

  1. Build metadata MAY be denoted by appending a plus sign and a series of dot separated identifiers immediately following the patch or pre-release version. Identifiers MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty. Build metadata SHOULD be ignored when determining version precedence. Thus two versions that differ only in the build metadata, have the same precedence. Examples: 1.0.0-alpha+001, 1.0.0+20130313144700, 1.0.0-beta+exp.sha.5114f85.

Since the spec states that build metadata SHOULD be ignored and doesn't state MUST be ignored, this means that we may want to compare build metadata, in other words it is not disallowed.

Please consider adding optional build metadata comparison. I have submitted a PR to introduce options to that effect.

yksnyn commented 6 months ago

The semver 2.0 spec (section 10) states:

  1. Build metadata MAY be denoted by appending a plus sign and a series of dot separated identifiers immediately following the patch or pre-release version. Identifiers MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty. Build metadata SHOULD be ignored when determining version precedence. Thus two versions that differ only in the build metadata, have the same precedence. Examples: 1.0.0-alpha+001, 1.0.0+20130313144700, 1.0.0-beta+exp.sha.5114f85.

Since the spec states that build metadata SHOULD be ignored and doesn't state MUST be ignored, this means that we may want to compare build metadata, in other words it is not disallowed.

Please consider adding optional build metadata comparison. I have submitted a PR to introduce options to that effect.

@adamreeve yksnyn@gmail.com