git.mk 594 Bytes
Newer Older
1
commit:
2
3
	git commit -a

4
tag:
5
6
	git tag ${VERSION}

7
push::
8
	git push -u --tags origin HEAD
9

10
11
12
pull::
	git pull --all

13
14
15
16
17
18
19
20
21
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)

22
.PHONY:: commit tag push push-github