Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions batch-change/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,18 @@ promoteToPublic:

# Create the final branch holding the tagged commit
git checkout "${promote_branch}"
git switch -c "${release_branch}"

git tag {{version}}
git switch -C "${release_branch}"

# A retried finalize finds its own tag; only a tag elsewhere is an error
if tagged=$(git rev-parse -q --verify "refs/tags/{{version}}^{commit}"); then
if [ "${tagged}" != "$(git rev-parse HEAD)" ]; then
echo "Tag {{version}} already exists at ${tagged}, not at ${promote_branch} ($(git rev-parse HEAD))" >&2
exit 1
fi
echo "Tag {{version}} already points at ${promote_branch}, not recreating it"
else
git tag {{version}}
fi
git push origin ${release_branch} --tags

# Web URL to the tag
Expand Down
2 changes: 1 addition & 1 deletion release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ promoteToPublic:

# Create the final branch holding the tagged commit
git checkout "${promote_branch}"
git switch -c "${release_branch}"
git switch -C "${release_branch}"

# A retried finalize finds its own tag; only a tag elsewhere is an error
if tagged=$(git rev-parse -q --verify "refs/tags/{{version}}^{commit}"); then
Expand Down
Loading