mirror of
https://github.com/zed-industries/zed.git
synced 2026-05-31 19:05:00 +07:00
script: Trigger docs release (#56953)
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 ...
This commit is contained in:
parent
d3d5fb0d15
commit
342580531c
1 changed files with 50 additions and 0 deletions
50
script/trigger-docs-build
Executable file
50
script/trigger-docs-build
Executable file
|
|
@ -0,0 +1,50 @@
|
|||
#!/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"
|
||||
Loading…
Reference in a new issue