diff --git a/commitizen/commands/bump.py b/commitizen/commands/bump.py index b82cac940..8e9f0f181 100644 --- a/commitizen/commands/bump.py +++ b/commitizen/commands/bump.py @@ -187,11 +187,6 @@ def __call__(self) -> None: # noqa: C901 "--major-version-zero cannot be combined with MANUAL_VERSION" ) - if prerelease_offset: - raise NotAllowed( - "--prerelease-offset cannot be combined with MANUAL_VERSION" - ) - if get_next: raise NotAllowed("--get-next cannot be combined with MANUAL_VERSION") diff --git a/docs/commands/bump.md b/docs/commands/bump.md index 49c6f0343..efdba7625 100644 --- a/docs/commands/bump.md +++ b/docs/commands/bump.md @@ -599,7 +599,7 @@ post_bump_hooks = [ ### `prerelease_offset` -Offset with which to start counting prereleses. +Offset with which to start counting prereleases. Defaults to: `0` diff --git a/tests/commands/test_bump_command.py b/tests/commands/test_bump_command.py index 934c0b817..52e2defde 100644 --- a/tests/commands/test_bump_command.py +++ b/tests/commands/test_bump_command.py @@ -1041,23 +1041,6 @@ def test_bump_with_hooks_and_increment(mocker: MockFixture, tmp_commitizen_proje assert tag_exists is True -@pytest.mark.usefixtures("tmp_commitizen_project") -def test_bump_manual_version_disallows_prerelease_offset(mocker): - create_file_and_commit("feat: new file") - - manual_version = "0.2.0" - testargs = ["cz", "bump", "--yes", "--prerelease-offset", "42", manual_version] - mocker.patch.object(sys, "argv", testargs) - - with pytest.raises(NotAllowed) as excinfo: - cli.main() - - expected_error_message = ( - "--prerelease-offset cannot be combined with MANUAL_VERSION" - ) - assert expected_error_message in str(excinfo.value) - - @pytest.mark.usefixtures("tmp_git_project") def test_bump_use_version_provider(mocker: MockFixture): mock = mocker.MagicMock(name="provider")