open-balena-api
open-balena-api copied to clipboard
Semver should always contain the computed term in build metadata for release.version field, never in the pre-release
Referencing the changes from this issue:
[...] but the release.version computed term will be appending the extra metadata at the end the prerelease or build part, depending on the value of is_final.
In my opinion the computed term should always be appended to the build part, as it has no part in the stability of a release, but is purely information coming from building the release.
From semver.org:
A pre-release version indicates that the version is unstable and might not satisfy the intended compatibility requirements as denoted by its associated normal version.
I therefore think the pre-release term should be completely in the hands of the user and the computed term should be appended to the build metadata, regardless of the value of is_final.
Furthermore the pre-release term is relevant for ordering releases, while the build part is not. Appending the computed term to the pre-release can therefore change the precedence of two releases, when they should be equal.