4 ms·
> semantic versioning allows "1.2.3alpha" and also 1.2.3-beta" No, according to the spec, the hyphen is mandatory: "A pre-release version MAY be denoted by app
by kibwen 4y ago
> semantic versioning allows "1.2.3alpha" and also 1.2.3-beta"
No, according to the spec, the hyphen is mandatory: "A pre-release version MAY be denoted by appending a hyphen and a series of dot separated identifiers immediately following the patch version."
- cookiengineer 4y agoYou interpreted your own copy/pasted answer wrongly. MAY has not the same meaning as MUST. MAY is optional, MUST is mandatory. > https://semver.org/#spec-item-9 https://semver.org/#spec-item-9
- tedunangst 4y agoYou may denote a prerelease version. Or not. But you can't just append any crap you like and call it the prerelease version.
- wongarsu 4y agoThe wording is ambiguous, but the BNF later in the spec [1] agrees with your interpretation. Valid version numbers are three numbers separated by dots, followed by either a minus and dot-separated pre-release versions; or a plus and dot-separated build identifiers. 1: https://semver.org/#backusnaur-form-grammar-for-valid-semver-versions https://semver.org/#backusnaur-form-grammar-for-valid-semver...
- kibwen 4y agoNo, that is a misreading. The "MAY" indicates that the prerelease identifier itself is optional. However, if you do append one, it must include a leading hyphen.