-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
52 lines (42 loc) · 1.13 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
46
47
48
49
50
51
52
VENV_BIN = python3 -m venv
VENV_DIR ?= .venv
VENV_ACTIVATE = $(VENV_DIR)/bin/activate
VENV_RUN = . $(VENV_ACTIVATE)
venv: $(VENV_ACTIVATE)
$(VENV_ACTIVATE): setup.py setup.cfg pyproject.toml
test -d .venv || $(VENV_BIN) .venv
$(VENV_RUN); pip install --upgrade pip setuptools wheel
$(VENV_RUN); pip install -e .[dev,deploy]
touch $(VENV_DIR)/bin/activate
clean:
rm -rf .venv
rm -rf build/
rm -rf .eggs/
rm -rf *.egg-info/
rm -rf node_modules
rm -rf deployments/cdk/cdk.out
install: venv
npm install; \
ln -sfn `pwd`/node_modules/aws-cdk/bin/cdk $(VENV_DIR)/bin/; \
ln -sfn `pwd`/node_modules/aws-cdk-local/bin/cdklocal $(VENV_DIR)/bin/
deploy-local:
$(VENV_RUN); \
cd deployments/cdk; \
cdklocal bootstrap || true; \
cdklocal deploy --all --require-approval never
deploy-aws:
$(VENV_RUN); \
cd deployments/cdk; \
cdk bootstrap || true; \
cdk deploy --all --require-approval never
destroy-local:
$(VENV_RUN); \
cd deployments/cdk; \
cdklocal destroy --all
destroy-aws:
$(VENV_RUN); \
cd deployments/cdk; \
cdk destroy --all
format:
$(VENV_ACTIVATE); python -m isort .; python -m black .
.PHONY: clean format install deploy