prerelease can't comply with the semver.org specification
See original GitHub issueCommitizen only implements the normalized PEP-440 prerelease format, excluding separators between :
- the release segment and the pre-release segment
- the pre-release signifier and the numeral
Therefore, when using the bump
command, we can’t define a version format which complies with the one defined by the semver.org specification :
“pre-release version MAY be denoted by appending a hyphen and a series of dot separated identifiers immediately following the patch version.”
“Examples: 1.0.0-alpha, 1.0.0-alpha.1, 1.0.0-0.3.7, 1.0.0-x.7.z.92.”
consequences
cz bump
can’t be used for prereleases alongside tools that follow this specification.
Especially, this leads to an error when using the Node.js semver package.
Yet, this package is used by a bunch of other tools, like Github Automatic Release (see error message below) and conventional-changelog.
The parameter "automatic_release_tag" was not set and the current tag "v1.0.0rc1" does not appear to conform to semantic versioning.
(node:3557) UnhandledPromiseRejectionWarning: Error: The parameter "automatic_release_tag" was not set and the current tag "v1.0.0rc1" does not appear to conform to semantic versioning.
at /home/runner/work/_actions/marvinpinto/action-automatic-releases/latest/dist/index.js:1:224465
at Generator.next (<anonymous>)
at /home/runner/work/_actions/marvinpinto/action-automatic-releases/latest/dist/index.js:1:221749
at new Promise (<anonymous>)
at n (/home/runner/work/_actions/marvinpinto/action-automatic-releases/latest/dist/index.js:1:221494)
at /home/runner/work/_actions/marvinpinto/action-automatic-releases/latest/dist/index.js:1:224406
at /home/runner/work/_actions/marvinpinto/action-automatic-releases/latest/dist/index.js:1:224971
at Generator.next (<anonymous>)
at /home/runner/work/_actions/marvinpinto/action-automatic-releases/latest/dist/index.js:1:221749
at new Promise (<anonymous>)
details
When adding a hyphen between patch
and release
in the configuration, it appears in all version numbers, including not prerelease ones (e.g. v1.2.3-
instead of v1.2.3
).
tag_format = "v$minor.$major.$patch-$prerelease"
In addition, there doesn’t seem to be any way to add a separator (dot) between the prerelease signifier and the numeral.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:8
- Comments:7 (4 by maintainers)
Top GitHub Comments
Unfortunately I haven’t had time to work on this, and I’ve just recently started working on this. But I do want to have it, because it will play well with tools that use semver like rust ecosystem or helm charts. There’s no pattern, we were relying on the version system from python.
I’ve run some tests and semver from poetry will be useful:
It will be some work to refactor, but doable.