From 13aaadaadb0d572b59c84a9851540ed1caeea35f Mon Sep 17 00:00:00 2001 From: Haacked Date: Wed, 13 Mar 2013 14:30:43 -0700 Subject: [PATCH] Add description of build metadata Build metadata is a completely optional way to tack on metadata to a version that does not affect the public API or precedence while still be compliant with SemVer. It's not unlike a comment. This allows folks to build on additional meaning or behavior that's meaningful to their custom systems without making any claims about the public version. For example, folks might use it for cache busting, layering custom behavior on top of SemVer, bookkeeping to tie when and where a build was made, etc. --- semver.md | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/semver.md b/semver.md index 306aeb3..257e329 100644 --- a/semver.md +++ b/semver.md @@ -79,18 +79,12 @@ MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-]. Pre-release versions satisfy but have a lower precedence than the associated normal version. Examples: 1.0.0-alpha, 1.0.0-alpha.1, 1.0.0-0.3.7, 1.0.0-x.7.z.92. -1. Unique build metadata MAY be denoted by appending a plus `+` and a series of -dot separated identifiers immediately following the patch or pre-release -version. While identifiers MUST be comprised of only ASCII alphanumerics and -hyphens [0-9A-Za-z\-], their values only define uniqueness. The Semantic -Versioning specation intentionally omits precedence rule definitions for -comparing two versions where only build metadata is different. Furthermore, -this specification does not define precedence rules for comparing a version -with build metadata to a version without build metadata. Specific -implementations of Semantic Versioning MAY define their own precedence rules -for those scenarios, but due to the lack of precedence defined within the -specification, consumers SHOULD NOT rely on build metadata when taking -dependencies on packages. +1. Build metadata MAY be denoted by appending a plus + and a series of dot +separated identifiers immediately following the patch or pre-release version. +Identifiers MUST be comprised of only ASCII alphanumerics and hyphen +[0-9A-Za-z-]. Build metadata SHOULD be ignored when determining version +precedence. Thus two packages with the same version, but different build +metadata are considered to be the same version. 1. Precedence MUST be calculated by separating the version into major, minor, patch, pre-release, and build identifiers in that order. Major, minor, and