-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
55 lines (43 loc) · 1019 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
46
47
48
49
50
51
52
53
54
55
export WORKDIR = $(shell pwd)
project=services
service_src = services
tests_src = tests
e2e_tests = $(tests_src)/e2e
int_tests = $(tests_src)/integration
all_src = $(service_src)
.PHONY: dev
dev:
pip install --upgrade pip pre-commit poetry
poetry install
pre-commit install
.PHONY: format
format:
poetry run isort --profile black $(all_src)
poetry run black $(all_src)
.PHONY: lint
lint: format
poetry run flake8 $(all_src)
.PHONY: pre-commit
pre-commit:
pre-commit run --show-diff-on-failure
.PHONY: synth
build: deps
poetry run sam build
.PHONY: guided
guided: deps build
poetry run sam deploy --guided
.PHONY: deploy
deploy: deps build
poetry run sam deploy
.PHONY: deploy/remove
deploy/remove:
poetry run sam delete
.PHONY: deps
deps:
scripts/make-deps.sh
.PHONY: clean
clean:
rm -rf .vscode .pytest_cache .coverage coverage.xml .mypy_cache
find services -type f -name "requirements.txt" -delete
find services tests -type d -name "__pycache__" -exec rm -rf {} \;
poetry env remove --all