-
Notifications
You must be signed in to change notification settings - Fork 32
/
Makefile
45 lines (37 loc) · 1.62 KB
/
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
export DJANGO_SETTINGS_MODULE?=wcivf.settings.lambda
export DC_ENVIRONMENT?=development
export AWS_DEFAULT_REGION?=eu-west-2
.PHONY: all
make all: build clean
.PHONY: build
build:
sam build -t ./sam-template.yaml
.PHONY: clean
clean: ## Delete any unneeded static asset files and git-restore the rendered API documentation file
rm -rf .aws-sam/build/WCIVFControllerFunction/wcivf/static/booklets/
rm -rf .aws-sam/build/WCIVFControllerFunction/wcivf/assets/booklets/
rm -rf .aws-sam/build/WCIVFControllerFunction/wcivf/assets/images/
rm -rf .aws-sam/build/WCIVFControllerFunction/wcivf/static/images/
rm -rf .aws-sam/build/WCIVFControllerFunction/wcivf/media/
rm -rf .aws-sam/build/WCIVFControllerFunction/docs/
rm -f .aws-sam/build/WCIVFControllerFunction/wcivf/settings/local.py
rm -f .aws-sam/build/WCIVFControllerFunction/results_app.dot
rm -f .aws-sam/build/WCIVFControllerFunction/results_app.png
rm -f .aws-sam/build/WCIVFControllerFunction/transifex.yml
rm -f .aws-sam/build/WCIVFControllerFunction/local.example
.PHONY: lambda-migrate
lambda-migrate: ## Invoke lambda to migrate the database
aws lambda invoke \
--function-name WCIVFControllerFunction \
--payload '{ "command": "migrate" }' \
--cli-binary-format raw-in-base64-out \
/dev/stdout | grep --invert-match 'FunctionError'
lib/dc_utils:
mkdir -p lib
ln -s `python -c 'import dc_utils; print(dc_utils.__path__[0])'` lib/dc_utils
.PHONY: makemessages
makemessages: lib/dc_utils
${VIRTUAL_ENV}/bin/python manage.py makemessages -l cy --ignore='env*'
.PHONY: compilemessages
compilemessages:
${VIRTUAL_ENV}/bin/python manage.py compilemessages --ignore='env*'