mirror of
https://github.com/zed-industries/zed.git
synced 2026-05-23 12:37:09 +00:00
Self-Review Checklist: - [x] I've reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable Closes #ISSUE Release Notes: - N/A or Added/Fixed/Improved ...
50 lines
1.2 KiB
Bash
Executable file
50 lines
1.2 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
which gh >/dev/null || brew install gh
|
|
|
|
case "${1:-}" in
|
|
preview | stable)
|
|
channel="$1"
|
|
;;
|
|
*)
|
|
echo "Usage: $0 preview|stable [--from-main]" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
case "${2:-}" in
|
|
"")
|
|
from_main=false
|
|
;;
|
|
--from-main)
|
|
from_main=true
|
|
;;
|
|
*)
|
|
echo "Usage: $0 preview|stable [--from-main]" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
version=$(./script/get-released-version "$channel")
|
|
branch=$(echo "$version" | sed -E 's/^([0-9]+)\.([0-9]+)\.[0-9]+$/v\1.\2.x/')
|
|
workflow_ref="$branch"
|
|
if [ "$from_main" = true ]; then
|
|
workflow_ref="main"
|
|
fi
|
|
|
|
echo "Triggering docs build for $channel ($branch) using workflow from $workflow_ref"
|
|
echo "This will publish docs from $branch before the next release."
|
|
echo "Only continue if $branch has no unreleased feature-specific docs."
|
|
read -r -p "Continue? [y/N] " confirmation
|
|
case "$confirmation" in
|
|
y | Y | yes | YES)
|
|
;;
|
|
*)
|
|
echo "Cancelled."
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
gh workflow run "deploy_docs.yml" --ref "$workflow_ref" -f channel="$channel" -f checkout_ref="$branch"
|
|
echo "Follow along at: https://github.com/zed-industries/zed/actions/workflows/deploy_docs.yml"
|