summaryrefslogtreecommitdiff
path: root/defs/gmake.mk
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2019-08-16 01:45:00 +0900
committerTakashi Kokubun <takashikkbn@gmail.com>2019-08-16 01:45:11 +0900
commitd21616eeb0616095bb96408036a7548a30987e02 (patch)
treeacda1253dce481db0c6a74e7486b1643512ecf0f /defs/gmake.mk
parent2665e5858f76e07ea8748a1931f500f961c5ceae (diff)
Clean up temporary git resources
after `make update-github`
Diffstat (limited to 'defs/gmake.mk')
-rw-r--r--defs/gmake.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/defs/gmake.mk b/defs/gmake.mk
index 2436d37bc3..231977d599 100644
--- a/defs/gmake.mk
+++ b/defs/gmake.mk
@@ -203,8 +203,10 @@ update-github: fetch-github
git -C "$(srcdir)" worktree add $(notdir $(GITHUB_UPDATE_WORKTREE)) "gh-$(PR)"
git -C "$(GITHUB_UPDATE_WORKTREE)" merge master --no-edit
@$(BASERUBY) -e 'print "Are you sure to push this to PR=$(PR)? [Y/n]: "; exit(gets.chomp == "n" ? 1 : 0)'
- git -C "$(GITHUB_UPDATE_WORKTREE)" remote add fork-$(PR) git@github.com:$(FORK_REPO).git
+ git -C "$(srcdir)" remote add fork-$(PR) git@github.com:$(FORK_REPO).git
git -C "$(GITHUB_UPDATE_WORKTREE)" push fork-$(PR) gh-$(PR):$(PR_BRANCH)
+ git -C "$(srcdir)" remote rm fork-$(PR)
+ git -C "$(srcdir)" worktree remove --force $(GITHUB_UPDATE_WORKTREE)
.PHONY: pull-github
pull-github: fetch-github