-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (23 loc) · 847 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
# Makefile to control the shit ...
#
.PHONY: tail deploy mail run install empty-bucket
PASSWORD := $(shell cat .password)
MAIL_SENDER := $(shell cat .mail_sender)
SECRET_KEY := $(shell cat .secret_key)
profile:
@gcloud config configurations activate default
tail:
@gcloud app logs tail -s default --level=debug
deploy: profile install
@cat app.tmpl|sed -e 's/%PASSWORD%/${PASSWORD}/' -e 's/%MAIL_SENDER%/${MAIL_SENDER}/' -e 's/%SECRET_KEY%/${SECRET_KEY}/' > app.yaml
@gcloud -q app deploy --promote --stop-previous-version
@rm -f app.yaml
mail:
@curl -i -X POST -d @test.msg http://localhost:8080/_ah/mail/[email protected]
run:
@dev_appserver.py app.yaml
install: lib/
echo > lib/__init__.py
pip install --upgrade -t lib -r requirements.txt
empty-bucket:
gsutil -m rm gs://camera-185513.appspot.com/*