Skip to content

Commit 7b4596a

Browse files
committed
docs: document the --prerelease option
1 parent b9e768e commit 7b4596a

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

docs/bump.md

+28
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,34 @@ Generate a **changelog** along with the new version and tag when bumping.
113113
cz bump --changelog
114114
```
115115
116+
### `--prerelease`
117+
118+
The bump is a pre-release bump, meaning that in addition to a possible version bump the new version receives a
119+
pre-release segment compatible with the bump’s version scheme, where the segment consist of a _phase_ and a
120+
non-negative number. Supported options for `--prerelease` are the following phase names `alpha`, `beta`, or
121+
`rc` (release candidate). For more details, refer to the
122+
[Python Packaging User Guide](https://packaging.python.org/en/latest/specifications/version-specifiers/#pre-releases).
123+
124+
Note that as per [semantic versioning spec](https://semver.org/#spec-item-9)
125+
126+
> Pre-release versions have a lower precedence than the associated normal version. A pre-release version
127+
> indicates that the version is unstable and might not satisfy the intended compatibility requirements
128+
> as denoted by its associated normal version.
129+
130+
For example, the following versions (using the [PEP 440](https://peps.python.org/pep-0440/) scheme) are ordered
131+
by their precedence and showcase how a release might flow through a development cycle:
132+
133+
- `1.0.0` is the current published version
134+
- `1.0.1a0` after committing a `fix:` for pre-release
135+
- `1.1.0a1` after committing an additional `feat:` for pre-release
136+
- `1.1.0b0` after bumping a beta release
137+
- `1.1.0rc0` after bumping the release candidate
138+
- `1.1.0` next feature release
139+
140+
Also note that bumping pre-releases _maintains linearity_: bumping of a pre-release with lower precedence than
141+
the current pre-release phase maintains the current phase of higher precedence. For example, if the current
142+
version is `1.0.0b1` then bumping with `--prerelease alpha` will continue to bump the “beta” phase.
143+
116144
### `--check-consistency`
117145
118146
Check whether the versions defined in `version_files` and the version in commitizen

0 commit comments

Comments
 (0)