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:
Casey Rodarmor 2019-05-15 16:07:41 -04:00 committed by GitHub
parent 9b08ce6fd8
commit d9986a393c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: