Skip to content

Commit

Permalink
check config before tagging
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilias Kyrlies committed Jun 24, 2023
1 parent bf38410 commit 3a6e3ee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bumpversion/scm.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,16 +161,16 @@ 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."""
sign_tags = config.sign_tags
tag_name = config.tag_name.format(**context)
tag_message = config.tag_message.format(**context)
existing_tags = cls.get_all_tags()
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
sign_tags = config.sign_tags
tag_name = config.tag_name.format(**context)
tag_message = config.tag_message.format(**context)
existing_tags = cls.get_all_tags()

do_tag = not dry_run

Expand Down

0 comments on commit 3a6e3ee

Please sign in to comment.