Skip to content

Commit 753c990

Browse files
author
Liam S. Crouch
committed
Fix not being able to tag without also committing
1 parent 9418a14 commit 753c990

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

bumpversion/scm.py

-3
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,6 @@ def commit_to_scm(
177177
@classmethod
178178
def tag_in_scm(cls, config: "Config", context: MutableMapping, dry_run: bool = False) -> None:
179179
"""Tag the current commit in the source code management system."""
180-
if not config.commit:
181-
logger.info("Would not tag since we are not committing")
182-
return
183180
if not config.tag:
184181
logger.info("Would not tag")
185182
return

tests/test_scm.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def test_commit_and_tag_from_below_scm_root(repo: str, scm_command: str, scm_cla
160160
[
161161
param(True, True, True, False, False, id="dry-run-stops-commit-and-tag"),
162162
param(True, False, False, True, False, id="commit-no-tag"),
163-
param(False, True, False, False, False, id="no-commit-stops-tag"),
163+
param(False, True, False, False, True, id="no-commit-will-tag"),
164164
],
165165
)
166166
def test_commit_tag_dry_run_interactions(

0 commit comments

Comments
 (0)