-
Notifications
You must be signed in to change notification settings - Fork 51
/
Makefile
47 lines (31 loc) · 859 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
.PHONY: default css dev deps missing-% watch test build deploy deploy-% deploy-commit
default: dev
###
# Variables
###
APPID=zach-navigator
APPYAML=app.yaml
CURRENT_DIR=$(shell pwd)
###
# Dependencies
###
GCLOUD_CMD = $(shell sh -c "which gcloud || echo 'missing-gcloud'")
DEVAPP_CMD = $(shell sh -c "which dev_appserver.py || echo 'missing-dev_appserver.py'")
missing-%:
$(error missing $*. please install)
deps: $(GCLOUD_CMD)
###
# Development
###
dev: deps $(DEVAPP_CMD)
$(DEVAPP_CMD) --host 0.0.0.0 .
###
# AppEngine Deploy
###
deploy: deploy-master
# Deploy to AppEngine with version = %
deploy-%: $(GCLOUD_CMD) build
gcloud app deploy --version $* --no-promote --project $(APPID)
@echo "deployed to http://$*-dot-$(APPID).appspot.com/"
# Deploy to AppEngine, with version = current git revision
##deploy-commit: deploy-$(GIT_COMMIT)