Skip to content

Commit

Permalink
Fix inconsistent returns
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesbvll committed Apr 29, 2024
1 parent b6f84a2 commit 811f149
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/py/flwr_tool/update_changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,7 @@ def _bump_minor_version(tag):
"""Bump the minor version of the tag."""
match = re.match(r"v(\d+)\.(\d+)\.(\d+)", tag.name)
if match is None:
print("Wrong tag format.")
return
return None
major, minor, _ = [int(x) for x in match.groups()]
# Increment the minor version and reset patch version
new_version = f"v{major}.{minor + 1}.0"
Expand All @@ -340,6 +339,10 @@ def main():
_update_changelog(prs)

new_version = _bump_minor_version(latest_tag)
if not new_version:
print("Wrong tag format.")
return

_add_shorlog(new_version, shortlog)

print("Changelog updated succesfully.")
Expand Down

0 comments on commit 811f149

Please sign in to comment.