From 3a6e3eebdbc16ae509754fd977625a4c9b19d82a Mon Sep 17 00:00:00 2001 From: Ilias Kyrlies Date: Sat, 24 Jun 2023 12:26:11 +0300 Subject: [PATCH] check config before tagging --- bumpversion/scm.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bumpversion/scm.py b/bumpversion/scm.py index ed41869b..8b324fab 100644 --- a/bumpversion/scm.py +++ b/bumpversion/scm.py @@ -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