Skip to content

Commit

Permalink
Fix error when script is run after the final tag is created.
Browse files Browse the repository at this point in the history
(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
  • Loading branch information
keertk authored and copybara-github committed Jun 5, 2023
1 parent 04fdec9 commit 4e7e8bf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/release/relnotes.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,13 @@ def get_external_authors_between(base, head):
is_major = bool(re.fullmatch(r"\d+.0.0", current_release))

tags = [tag for tag in git("tag", "--sort=refname") if "pre" not in tag]

# Get the baseline for RCs (before release tag is created)
if current_release not in tags:
tags.append(current_release)
tags.sort()
last_release = tags[tags.index(current_release) - 1]
else:
print("Error: release tag already exists")
sys.exit(1)

tags.sort()
last_release = tags[tags.index(current_release) - 1]

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

0 comments on commit 4e7e8bf

Please sign in to comment.