aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorjackyzha0 <[email protected]>2020-07-17 22:07:26 -0700
committerjackyzha0 <[email protected]>2020-07-17 22:07:26 -0700
commit1ebd7755737895cf0735b4bbd4bdf728858fffae (patch)
tree154b1ddcd9382defb6216718007f3e8dcd9ba613 /Makefile
parentMerge pull request #50 from jackyzha0/cache-invalidation (diff)
downloadctrl-v-1ebd7755737895cf0735b4bbd4bdf728858fffae.tar.xz
ctrl-v-1ebd7755737895cf0735b4bbd4bdf728858fffae.zip
refactor decorators
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 16 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 7ce24d6..c1a1e18 100644
--- a/Makefile
+++ b/Makefile
@@ -1,22 +1,27 @@
-run:
+.DEFAULT_GOAL := help
+
+help: ## Show all Makefile targets
+ @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
+
+run: ## Start backend
cd backend && go run .
-lint:
+lint: ## Lint backend
cd backend && golangci-lint run
-docker-build:
+docker-build: ## Docker build backend
docker build -t jzhao2k19/ctrl-v:latest ./backend
-docker-run: docker-build
+docker-run: docker-build ## Start dockerized backend
docker run -p 8080:8080 jzhao2k19/ctrl-v:latest
-gcr: docker-build
+gcr: docker-build ## Push to GCR
docker tag jzhao2k19/ctrl-v:latest gcr.io/ctrl-v-278404/backend && docker push gcr.io/ctrl-v-278404/backend
-docker-push:
+docker-push: ## Push to Docker Hub
docker push jzhao2k19/ctrl-v:latest
-fe-run:
+fe-run: ## Start Frontend
cd frontend && yarn start
-fe-build:
+fe-build: ## Productionize Frontend
cd frontend && yarn build
-fe-deploy: fe-build
+fe-deploy: fe-build ## Deploy frontend to Firebase
cd frontend && firebase deploy
-dev:
+dev: ## Start backend and frontend
make -j 2 run fe-run
-deploy:
+deploy: ## Deploy backend and frontend
gcr && fe-deploy \ No newline at end of file