Skip to content

Commit 3a6e3ee

Browse files
author
Ilias Kyrlies
committed
check config before tagging
1 parent bf38410 commit 3a6e3ee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bumpversion/scm.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -161,16 +161,16 @@ def commit_to_scm(
161161
@classmethod
162162
def tag_in_scm(cls, config: "Config", context: MutableMapping, dry_run: bool = False) -> None:
163163
"""Tag the current commit in the source code management system."""
164-
sign_tags = config.sign_tags
165-
tag_name = config.tag_name.format(**context)
166-
tag_message = config.tag_message.format(**context)
167-
existing_tags = cls.get_all_tags()
168164
if not config.commit:
169165
logger.info("Would not tag since we are not committing")
170166
return
171167
if not config.tag:
172168
logger.info("Would not tag")
173169
return
170+
sign_tags = config.sign_tags
171+
tag_name = config.tag_name.format(**context)
172+
tag_message = config.tag_message.format(**context)
173+
existing_tags = cls.get_all_tags()
174174

175175
do_tag = not dry_run
176176

0 commit comments

Comments
 (0)