mirror of
https://github.com/semver/semver.git
synced 2025-08-25 15:25:29 +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
|
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.
|
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
|
1. Build metadata MAY be denoted by appending a plus + and a series of dot
|
||||||
dot separated identifiers immediately following the patch or pre-release
|
separated identifiers immediately following the patch or pre-release version.
|
||||||
version. While identifiers MUST be comprised of only ASCII alphanumerics and
|
Identifiers MUST be comprised of only ASCII alphanumerics and hyphen
|
||||||
hyphens [0-9A-Za-z\-], their values only define uniqueness. The Semantic
|
[0-9A-Za-z-]. Build metadata SHOULD be ignored when determining version
|
||||||
Versioning specation intentionally omits precedence rule definitions for
|
precedence. Thus two packages with the same version, but different build
|
||||||
comparing two versions where only build metadata is different. Furthermore,
|
metadata are considered to be the same version.
|
||||||
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. Precedence MUST be calculated by separating the version into major, minor,
|
1. Precedence MUST be calculated by separating the version into major, minor,
|
||||||
patch, pre-release, and build identifiers in that order. Major, minor, and
|
patch, pre-release, and build identifiers in that order. Major, minor, and
|
||||||
|
Loading…
Reference in New Issue
Block a user