Improve done
recipe (#444)
The old version often failed due to rebase conflicts if the feature branch to delete had multiple commits and was squash-merged into master. This version just checks that the up-to-date master branch matches the feature branch and uses -D to delete the feature branch. This guarantees that we don't lose any work, and avoids bad rebases from squash merges to master.
This commit is contained in:
parent
9b08ce6fd8
commit
d9986a393c
6
justfile
6
justfile
@ -51,11 +51,11 @@ publish: publish-check
|
|||||||
|
|
||||||
# clean up feature branch BRANCH
|
# clean up feature branch BRANCH
|
||||||
done BRANCH:
|
done BRANCH:
|
||||||
git checkout {{BRANCH}}
|
|
||||||
git pull --rebase github master
|
|
||||||
git checkout master
|
git checkout master
|
||||||
|
git diff --no-ext-diff --quiet --exit-code
|
||||||
git pull --rebase github master
|
git pull --rebase github master
|
||||||
git branch -d {{BRANCH}}
|
git diff --no-ext-diff --quiet --exit-code {{BRANCH}}
|
||||||
|
git branch -D {{BRANCH}}
|
||||||
|
|
||||||
# install just from crates.io
|
# install just from crates.io
|
||||||
install:
|
install:
|
||||||
|
Loading…
Reference in New Issue
Block a user