-
Notifications
You must be signed in to change notification settings - Fork 32
/
Makefile
31 lines (27 loc) · 1.21 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
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" }' \
/dev/stdout