1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Make make update-github idempotent

This commit is contained in:
Takashi Kokubun 2019-08-16 01:18:26 +09:00
parent d013d8e02e
commit 789f17665e
No known key found for this signature in database
GPG key ID: 6FFC433B12EE23DD

View file

@ -199,7 +199,7 @@ update-github: checkout-github
$(eval FORK_REPO := $(shell echo $(PULL_REQUEST_FORK_BRANCH) | cut -d' ' -f1))
$(eval PR_BRANCH := $(shell echo $(PULL_REQUEST_FORK_BRANCH) | cut -d' ' -f2))
git merge master --no-edit
git remote add fork-$(PR) git@github.com:$(FORK_REPO).git
git remote get-url fork-$(PR) || git remote add fork-$(PR) git@github.com:$(FORK_REPO).git
git push fork-$(PR) gh-$(PR):$(PR_BRANCH)
git remote rm fork-$(PR)