retag-release

 1#!/usr/bin/env bash
 2
 3set -eu
 4
 5usage() {
 6  echo "Usage: $0 <branch>"
 7  echo ""
 8  echo "Re-tags the HEAD of a release branch by force-updating the tag."
 9  echo "This is useful when commits were added to a release branch after"
10  echo "tagging but before the release was published."
11  echo ""
12  echo "Arguments:"
13  echo "  branch    Release branch name (e.g. v0.180.x)"
14  exit 1
15}
16
17branch="${1:-}"
18
19if [[ -z "$branch" ]]; then
20  usage
21fi
22
23which gh > /dev/null 2>&1 || {
24  echo "error: GitHub CLI (gh) is required but not installed." >&2
25  echo "Install it with: brew install gh" >&2
26  exit 1
27}
28
29echo "Triggering retag_release workflow:"
30echo "  branch: $branch"
31echo ""
32
33gh workflow run retag_release.yml \
34  -f branch="$branch"
35
36echo ""
37echo "Workflow triggered. Monitor progress at:"
38echo "  https://github.com/zed-industries/zed/actions/workflows/retag_release.yml"