Skip to content

Commit 4e7e8bf

Browse files
keertkcopybara-github
authored andcommitted
Fix error when script is run after the final tag is created.
(This script is run at different points in the release process, including once after the tag is created to update the final release index page and GitHub release page.) PiperOrigin-RevId: 537860711 Change-Id: I6bf129c82eb2c83b37993d4ef691d4783c5735b6
1 parent 04fdec9 commit 4e7e8bf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

scripts/release/relnotes.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,13 +171,13 @@ def get_external_authors_between(base, head):
171171
is_major = bool(re.fullmatch(r"\d+.0.0", current_release))
172172

173173
tags = [tag for tag in git("tag", "--sort=refname") if "pre" not in tag]
174+
175+
# Get the baseline for RCs (before release tag is created)
174176
if current_release not in tags:
175177
tags.append(current_release)
176-
tags.sort()
177-
last_release = tags[tags.index(current_release) - 1]
178-
else:
179-
print("Error: release tag already exists")
180-
sys.exit(1)
178+
179+
tags.sort()
180+
last_release = tags[tags.index(current_release) - 1]
181181

182182
# Assuming HEAD is on the current (to-be-released) release, find the merge
183183
# base with the last release so that we know which commits to generate notes

0 commit comments

Comments
 (0)