./script/trigger-release (#10589)
Add `./script/trigger-release {nightly|stable|preview}` This command can be run regardless of the state of your local git repository, and it either triggers a workflow run of `bump_patch_version.yml` (for stable/preview) or it force pushes the nightly tag. Also add some docs on releases to explain all of this. Release Notes: - N/A
This commit is contained in:
parent
bc7eaa6cd5
commit
c4e446f8a8
5 changed files with 87 additions and 15 deletions
|
@ -2,12 +2,6 @@
|
|||
|
||||
set -e
|
||||
|
||||
branch=$(git rev-parse --abbrev-ref HEAD)
|
||||
if [ "$branch" != "main" ]; then
|
||||
echo "You must be on main to run this script"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
git pull --ff-only origin main
|
||||
git tag -f nightly
|
||||
git fetch origin main:tags/nightly -f
|
||||
git log --oneline -1 nightly
|
||||
git push -f origin nightly
|
||||
|
|
21
script/get-released-version
Executable file
21
script/get-released-version
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
|
||||
channel="$1"
|
||||
|
||||
query=""
|
||||
case $channel in
|
||||
stable)
|
||||
;;
|
||||
preview)
|
||||
query="&preview=1"
|
||||
;;
|
||||
nightly)
|
||||
query="&nightly=1"
|
||||
;;
|
||||
*)
|
||||
echo "this must be run on either of stable|preview|nightly release branches" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
curl -s https://zed.dev/api/releases/latest?asset=Zed.dmg$query | jq -r .version
|
15
script/trigger-release
Executable file
15
script/trigger-release
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
which gh >/dev/null || brew install gh
|
||||
|
||||
if [ "$1" == "nightly" ]; then
|
||||
./script/bump-nightly
|
||||
exit
|
||||
fi
|
||||
|
||||
version=$(./script/get-released-version "$1" | sed 's/\.[^\.]*$/.x/')
|
||||
echo "Bumping $1 (v$version)"
|
||||
|
||||
gh workflow run "bump_patch_version.yml" -f branch="v$version"
|
||||
echo "Follow along at: https://github.com/zed-industries/zed/actions"
|
Loading…
Add table
Add a link
Reference in a new issue