Skip to content

Commit bdbe1d3

Browse files
committed
Fix issue with initial_version calculation
1 parent 64f2aa8 commit bdbe1d3

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

scripts/release/release_notes.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,10 @@ def calculate_next_version_with_changelog(
6363
changelog: list[ChangeEntry] = get_changelog_entries(previous_version_commit, repo, changelog_sub_path)
6464
changelog_kinds = list(set(entry.kind for entry in changelog))
6565

66-
# If there is no previous version tag, we start with the initial version tag
67-
if not previous_version_tag:
68-
version = initial_version
69-
else:
70-
version = calculate_next_release_version(previous_version_tag.name, changelog_kinds)
66+
# Use initial version if no previous tag exists, otherwise use the tag name
67+
previous_version = previous_version_tag.name if previous_version_tag else initial_version
68+
69+
version = calculate_next_release_version(previous_version, changelog_kinds)
7170

7271
return version, changelog
7372

0 commit comments

Comments
 (0)