2017-09-29 13:11:08 +00:00
|
|
|
commit:
|
2017-09-27 19:08:21 +00:00
|
|
|
git commit -a
|
|
|
|
|
2017-09-29 13:11:08 +00:00
|
|
|
tag:
|
2017-09-27 19:08:21 +00:00
|
|
|
git tag ${VERSION}
|
|
|
|
|
2017-09-29 13:11:08 +00:00
|
|
|
push::
|
2017-09-27 19:08:21 +00:00
|
|
|
git push --tags origin master
|
|
|
|
|
2017-09-29 13:11:08 +00:00
|
|
|
pull::
|
|
|
|
git pull --all
|
|
|
|
|
2017-09-27 19:08:21 +00:00
|
|
|
push-github: ## Push the code to github. You need to set up HUB_USER and HUB_PASSWORD
|
|
|
|
$(eval KEY_FILE := $(shell mktemp))
|
|
|
|
@echo "$$GITHUB_DEPLOY_KEY" > $(KEY_FILE)
|
|
|
|
@git remote rm github-deploy || true
|
|
|
|
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 push github-deploy $(CI_COMMIT_REF_NAME)
|
|
|
|
rm $(KEY_FILE)
|
|
|
|
|
2017-09-29 13:11:08 +00:00
|
|
|
.PHONY:: commit tag push push-github
|