AZ-400 ยท Package management
Versioning packages and pipeline artifacts
SemVer, CalVer, pre-release labels, build number formats and counters in Azure Pipelines, GitVersion, versioning release artifacts and container tags.
Key points
- SemVer MAJOR.MINOR.PATCH: major = breaking changes, minor = backward-compatible features, patch = fixes.
- Pre-release label: 1.4.0-rc.1 ranks below 1.4.0.
- CalVer encodes a date, for example 2026.10.
- Azure Pipelines: top-level name property sets the run number with tokens like $(Date:yyyyMMdd) and $(Rev:r).
- $(Rev:r) resets to 1 when the rest of the number changes.
- GitVersion derives SemVer from git history.
Source: https://learn.microsoft.com/en-us/azure/devops/pipelines/process/run-number?view=azure-devops
Practice questions
Under SemVer, version 2.4.1 becomes 2.5.0 after a release that adds backward-compatible functionality. Which segment signals that kind of change?
- MINOR
- MAJOR
- PATCH
- The pre-release label
Show answer
Answer: A. MINOR
MINOR rises for backward-compatible features and resets PATCH to 0. MAJOR is for breaking changes, PATCH for fixes.
Which of these are valid SemVer versions?
- 1.4.0-rc.1
- 3.0.0-alpha
- 1.4
- v1.4.0
- 1.04.0
Show answer
Answer: A. 1.4.0-rc.1, B. 3.0.0-alpha
A hyphen plus dot-separated identifiers makes a valid pre-release. Two segments are incomplete, a leading v is a tag convention rather than part of the version, and leading zeros are not allowed.
$(Rev:r) in a run number keeps counting upward across days no matter how the rest of the format looks.
Show answer
Answer: False
It resets to 1 whenever another part of the number changes, so with $(Date:yyyyMMdd) in the format it restarts every day.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
