1
0
mirror of https://github.com/gsi-upm/senpy synced 2024-11-22 08:12:27 +00:00

Merge branch 'senpy' into 'master'

Senpy

See merge request docs/templates/makefiles!6
This commit is contained in:
J. Fernando Sánchez 2017-10-03 15:25:58 +00:00
commit 4f88009bd7

6
git.mk
View File

@ -13,12 +13,12 @@ git-pull:
push-github: ## Push the code to github. You need to set up GITHUB_DEPLOY_KEY push-github: ## Push the code to github. You need to set up GITHUB_DEPLOY_KEY
ifeq ($(GITHUB_DEPLOY_KEY),) ifeq ($(GITHUB_DEPLOY_KEY),)
else else
$(eval KEY_FILE := $(shell mktemp)) $(eval KEY_FILE := "$(shell mktemp)")
@echo "$(GITHUB_DEPLOY_KEY)" > $(KEY_FILE) @echo "$(GITHUB_DEPLOY_KEY)" > $(KEY_FILE)
@git remote rm github-deploy || true @git remote rm github-deploy || true
git remote add github-deploy $(GITHUB_REPO) git remote add github-deploy $(GITHUB_REPO)
@GIT_SSH_COMMAND="ssh -i $(KEY_FILE)" git fetch github-deploy $(CI_COMMIT_REF_NAME) || true -@GIT_SSH_COMMAND="ssh -i $(KEY_FILE)" git fetch github-deploy $(CI_COMMIT_REF_NAME)
@GIT_SSH_COMMAND="ssh -i $(KEY_FILE)" git push github-deploy $(CI_COMMIT_REF_NAME) @GIT_SSH_COMMAND="ssh -i $(KEY_FILE)" git push github-deploy HEAD:$(CI_COMMIT_REF_NAME)
rm $(KEY_FILE) rm $(KEY_FILE)
endif endif