Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove main push from bump-zed-minor-versions script #22170

Merged
merged 2 commits into from
Dec 18, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 22 additions & 8 deletions script/bump-zed-minor-versions
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ minor_branch_name="v${major}.${minor}.x"
prev_minor_branch_name="v${major}.${prev_minor}.x"
next_minor_branch_name="v${major}.${next_minor}.x"
preview_tag_name="v${major}.${minor}.${patch}-pre"
bump_main_branch_name="set-minor-version-to-${major}.${next_minor}"

git fetch origin ${prev_minor_branch_name}:${prev_minor_branch_name}
git fetch origin --tags
Expand Down Expand Up @@ -83,29 +84,42 @@ git tag ${preview_tag_name}
echo "Preparing main for version ${next_minor_branch_name}..."
git checkout -q main
git clean -q -dff
old_main_sha=$(git rev-parse HEAD)
git checkout -q -b ${bump_main_branch_name}
cargo set-version --package zed --bump minor
cargo check -q
git commit -q --all --message "${next_minor_branch_name} dev"
message="${next_minor_branch_name} dev

Release Notes:

- N/A"
git commit -q --all --message "$message"

git checkout -q main

cat <<MESSAGE
Prepared new Zed versions locally.
Prepared new Zed versions locally. You will need to push the branches and open a PR for the change to main.

# To open the PR:

git checkout ${bump_main_branch_name}
git push origin ${bump_main_branch_name}
gh pr create --fill --web
notpeter marked this conversation as resolved.
Show resolved Hide resolved

To push this:
# To push this:

git push origin \\
${preview_tag_name} \\
${stable_tag_name} \\
${minor_branch_name} \\
${prev_minor_branch_name} \\
main
${prev_minor_branch_name}

To undo this:
# To undo this push:

git reset --hard ${old_main_sha} && git push -f . \\
git push -f . \\
:${preview_tag_name} \\
:${stable_tag_name} \\
:${minor_branch_name} \\
:${bump_main_branch_name} \\
${old_prev_minor_sha}:${prev_minor_branch_name}

MESSAGE
Loading