Skip to content

Commit 9377d32

Browse files
committed
fix(bump): manual version bump if prerelease offset is configured
If you use the prerelase offset in the .cz.toml, as in the following example, no bump with a manual version number is possible. The error occurs when bumping with manual version number: cz bump 9.8.7 --prerelease-offset cannot be combined with MANUAL_VERSION ```toml [tool.commitizen] changelog_incremental = true tag_format = "v$version" update_changelog_on_bump = true version = "1.2.0b13" prerelease_offset = 1 ```
1 parent 43ee8a0 commit 9377d32

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

commitizen/commands/bump.py

-5
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,6 @@ def __call__(self) -> None: # noqa: C901
187187
"--major-version-zero cannot be combined with MANUAL_VERSION"
188188
)
189189

190-
if prerelease_offset:
191-
raise NotAllowed(
192-
"--prerelease-offset cannot be combined with MANUAL_VERSION"
193-
)
194-
195190
if get_next:
196191
raise NotAllowed("--get-next cannot be combined with MANUAL_VERSION")
197192

docs/commands/bump.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ post_bump_hooks = [
599599

600600
### `prerelease_offset`
601601

602-
Offset with which to start counting prereleses.
602+
Offset with which to start counting prereleases.
603603

604604
Defaults to: `0`
605605

0 commit comments

Comments
 (0)