Skip to content

Commit 29319c8

Browse files
committed
fixing a python specific workaround
1 parent 129ea7a commit 29319c8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

continuous_delivery_scripts/generate_news.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def _calculate_version(commit_type: CommitType, use_news_files: bool) -> Tuple[b
5757
new_version: Optional[str] = None
5858
is_new_version: bool = False
5959
with cd(os.path.dirname(project_config_path)):
60-
old, _, updates = auto_version_tool.main(
60+
old, new_version, updates = auto_version_tool.main(
6161
release=is_release,
6262
enable_file_triggers=enable_file_triggers,
6363
commit_count_as=bump,
@@ -66,7 +66,9 @@ def _calculate_version(commit_type: CommitType, use_news_files: bool) -> Tuple[b
6666
# Autoversion second returned value is not actually the new version
6767
# There seem to be a bug in autoversion.
6868
# This is why the following needs to be done to determine the version
69-
new_version = updates["__version__"]
69+
for k, v in updates.items():
70+
if "version" in str(k).lower():
71+
new_version = updates[k]
7072
is_new_version = old != new_version
7173
logger.info(":: Determining the new version")
7274
logger.info(f"Version: {new_version}")

0 commit comments

Comments
 (0)