Fix script/bump-zed-minor-versions. Revert #22834 Revert #22614 (#22837)

Fixes an incorrect error message.
Turns out it is impossible to set remote tracking to a branch that doesn't exist on the remote, so let's not even try.

Reverts #22834
Reverts #22614
This commit is contained in:
Peter Tripp 2025-01-08 15:59:30 +00:00 committed by GitHub
parent 7f0e13258c
commit ebc4688c2a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -66,7 +66,7 @@ git checkout -q ${prev_minor_branch_name}
git clean -q -dff git clean -q -dff
stable_tag_name="v$(script/get-crate-version zed)" stable_tag_name="v$(script/get-crate-version zed)"
if git show-ref --quiet refs/tags/${stable_tag_name}; then if git show-ref --quiet refs/tags/${stable_tag_name}; then
echo "tag ${preview_tag_name} already exists" echo "tag ${stable_tag_name} already exists"
exit 1 exit 1
fi fi
old_prev_minor_sha=$(git rev-parse HEAD) old_prev_minor_sha=$(git rev-parse HEAD)
@ -77,7 +77,6 @@ git tag ${stable_tag_name}
echo "Creating new preview branch ${minor_branch_name}..." echo "Creating new preview branch ${minor_branch_name}..."
git checkout -q main git checkout -q main
git checkout -q -b ${minor_branch_name} git checkout -q -b ${minor_branch_name}
git branch --set-upstream-to=origin/${minor_branch_name} ${minor_branch_name} --no-advice
echo -n preview > crates/zed/RELEASE_CHANNEL echo -n preview > crates/zed/RELEASE_CHANNEL
git commit -q --all --message "${minor_branch_name} preview" git commit -q --all --message "${minor_branch_name} preview"
git tag ${preview_tag_name} git tag ${preview_tag_name}