Skip to content

Commit

Permalink
Add a Makefile to deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
janakj committed Dec 15, 2024
1 parent 0fd0649 commit 1881f2a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
default: deploy

.PHONY: deploy-check-git
.ONESHELL:
.SHELLFLAGS: -e
check-git:
test "$$(git branch --show-current)" == "main"
test -z "$$(git status --porcelain)"

.PHONY: deploy-github
deploy-github: check-git
git push origin

.PHONY: deploy-gitlab
deploy-gitlab: check-git
git push gitlab

.PHONY: deploy
deploy: deploy-github deploy-gitlab

0 comments on commit 1881f2a

Please sign in to comment.