mirror of
https://github.com/zed-industries/zed.git
synced 2026-07-09 16:00:35 +00:00
This slightly reworks the extension CLI bump workflow - instead of triggering on label push, it now triggers on workflow dispatch with a message enforced to be added there. This primarily allows us to add a message to these bumps to better communicate what changes with that version of the CLI. Furthermore, we can soon restrict the label to be only created by that workflow, which has the advantage that it can only be based off of main. Also, it has the nice side-effect that we actually only ever update the label if everything worked properly. Release Notes: - N/A
34 lines
1 KiB
Bash
Executable file
34 lines
1 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -eu
|
|
|
|
usage() {
|
|
echo "Usage: $0 <message>"
|
|
echo ""
|
|
echo "Triggers the publish_extension_cli workflow on main to build a new"
|
|
echo "extension CLI binary, bump the 'extension-cli' tag after a successful"
|
|
echo "build, and open PRs that update the SHA used by the zed and"
|
|
echo "zed-industries/extensions repositories."
|
|
echo ""
|
|
echo "Arguments:"
|
|
echo " message Describes why the extension CLI is being bumped /"
|
|
echo " what the changes include. Included in the PR bodies."
|
|
exit 1
|
|
}
|
|
|
|
if [[ $# -lt 1 || -z "${1:-}" ]]; then
|
|
echo "error: a message describing the bump is required" >&2
|
|
echo "" >&2
|
|
usage >&2
|
|
fi
|
|
|
|
which gh > /dev/null 2>&1 || {
|
|
echo "error: GitHub CLI (gh) is required but not installed." >&2
|
|
echo "Install it with: brew install gh" >&2
|
|
exit 1
|
|
}
|
|
|
|
gh workflow run publish_extension_cli.yml --ref main -f message="$1"
|
|
|
|
echo "Workflow triggered. Monitor progress at:"
|
|
echo " https://github.com/zed-industries/zed/actions/workflows/publish_extension_cli.yml"
|