From 753c9904505794dd66b0cda0f29206865eeacb3d Mon Sep 17 00:00:00 2001 From: "Liam S. Crouch" Date: Fri, 29 Dec 2023 14:02:20 +0900 Subject: [PATCH] Fix not being able to tag without also committing --- bumpversion/scm.py | 3 --- tests/test_scm.py | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/bumpversion/scm.py b/bumpversion/scm.py index 43f1e16c..f5a2272b 100644 --- a/bumpversion/scm.py +++ b/bumpversion/scm.py @@ -177,9 +177,6 @@ def commit_to_scm( @classmethod def tag_in_scm(cls, config: "Config", context: MutableMapping, dry_run: bool = False) -> None: """Tag the current commit in the source code management system.""" - if not config.commit: - logger.info("Would not tag since we are not committing") - return if not config.tag: logger.info("Would not tag") return diff --git a/tests/test_scm.py b/tests/test_scm.py index ed0bab0a..1f93eb44 100644 --- a/tests/test_scm.py +++ b/tests/test_scm.py @@ -160,7 +160,7 @@ def test_commit_and_tag_from_below_scm_root(repo: str, scm_command: str, scm_cla [ param(True, True, True, False, False, id="dry-run-stops-commit-and-tag"), param(True, False, False, True, False, id="commit-no-tag"), - param(False, True, False, False, False, id="no-commit-stops-tag"), + param(False, True, False, False, True, id="no-commit-will-tag"), ], ) def test_commit_tag_dry_run_interactions(