KCNA · Question #102
Imagine you're releasing open-source software for the first time. Which of the following is a valid semantic version?
The correct answer is C. 0.1.0-rc. Semantic Versioning (SemVer) specifies a three-part version number (MAJOR.MINOR.PATCH) and optional pre-release/build metadata.
Question
Imagine you're releasing open-source software for the first time. Which of the following is a valid semantic version?
Options
- A1.0
- B2021-10-11
- C0.1.0-rc
- Dv1beta1
How the community answered
(49 responses)- A4% (2)
- B2% (1)
- C94% (46)
Why each option
Semantic Versioning (SemVer) specifies a three-part version number (MAJOR.MINOR.PATCH) and optional pre-release/build metadata.
1.0 is incomplete as a strict semantic version, as it is missing the patch number which is required by the MAJOR.MINOR.PATCH format.
2021-10-11 is a date-based versioning scheme and does not adhere to the MAJOR.MINOR.PATCH format of Semantic Versioning.
0.1.0-rc is a valid semantic version because it follows the MAJOR.MINOR.PATCH format (0.1.0) and includes a valid pre-release identifier ("rc") indicating a release candidate, which is appended after a hyphen, compliant with the SemVer specification.
v1beta1 is a common API versioning convention, but it does not conform to the MAJOR.MINOR.PATCH structure of Semantic Versioning.
Concept tested: Semantic Versioning (SemVer) syntax
Source: https://semver.org/spec/v2.0.0.html
Topics
Community Discussion
No community discussion yet for this question.