Something went wrong. Try again.
a few hacks on top of zed
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556#!/usr/bin/env bash
set -eu
package=$1tag_prefix=$2tag_suffix=$3version_increment=$4gpui_release=${5:-false}
if [[ -n $(git status --short --untracked-files=no) ]]; then echo "can't bump version with uncommitted changes" exit 1fi
which cargo-set-version > /dev/null || cargo install cargo-editwhich jq > /dev/null || brew install jqcargo set-version --package $package --bump $version_incrementcargo check --quiet
new_version=$(script/get-crate-version $package)branch_name=$(git rev-parse --abbrev-ref HEAD)old_sha=$(git rev-parse HEAD)tag_name=${tag_prefix}${new_version}${tag_suffix}
git commit --quiet --all --message "${package} ${new_version}"git tag ${tag_name}
if [[ "$gpui_release" == "true" ]]; thencat <<MESSAGELocally committed and tagged ${package} version ${new_version}
To push this:
git push origin ${tag_name} ${branch_name}; gh pr create -H ${branch_name}
To undo this:
git branch -D ${branch_name} && git tag -d ${tag_name}
MESSAGEelsecat <<MESSAGELocally committed and tagged ${package} version ${new_version}
To push this:
git push origin ${tag_name} ${branch_name}
To undo this:
git reset --hard ${old_sha} && git tag -d ${tag_name}
MESSAGEfi