Skip to content

Commit

Permalink
Fix not being able to tag without also committing
Browse files Browse the repository at this point in the history
  • Loading branch information
Liam S. Crouch committed Dec 29, 2023
1 parent 9418a14 commit 753c990
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions bumpversion/scm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/test_scm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 753c990

Please sign in to comment.