mirror of
https://github.com/semver/semver.git
synced 2025-08-25 07:15:30 +00:00
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.
This commit is contained in:
parent
26e3cf8523
commit
13aaadaadb
18
semver.md
18
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
|
||||
|
Loading…
Reference in New Issue
Block a user