Skip to content

Commit 50015cb

Browse files
committed
chore: update makefile
1 parent 8505433 commit 50015cb

File tree

1 file changed

+32
-10
lines changed

1 file changed

+32
-10
lines changed

Makefile

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,38 @@
1-
all:
2-
@echo "Specify a valid target"
3-
@exit 1
1+
VENV = .venv/bin
42

5-
py-test:
3+
.PHONY: all
4+
all: install-deps build fmt lint test
5+
6+
.PHONY: install-deps
7+
install-deps:
8+
@echo "=== Running target: install-deps ==="
9+
npm install --ignore-scripts
10+
python3 -m venv .venv && \
11+
$(VENV)/pip install -r requirements.txt
12+
13+
.PHONY: build
14+
build:
15+
@echo "=== Running target: build ==="
16+
npm run build # runs build through prepare-script
17+
18+
.PHONY: test
19+
test:
20+
@echo "=== Running target: test ==="
21+
npm run test
622
TARGET_BUCKET_URL=s3://dummy/web \
723
EXPIRE_SECONDS=86400 \
824
DEPLOY_LOG_BUCKET_URL=s3://dummy/deployments.log \
9-
python -m unittest discover webapp_deploy
25+
$(VENV)/python -m unittest discover webapp_deploy
1026

11-
py-format:
12-
black webapp_deploy
27+
.PHONY: fmt
28+
fmt:
29+
@echo "=== Running target: py-format ==="
30+
npm run lint:fix
31+
$(VENV)/black webapp_deploy
1332

14-
py-lint:
15-
flake8 --exclude .venv webapp_deploy
16-
black --check webapp_deploy
33+
.PHONY: lint
34+
lint:
35+
@echo "=== Running target: py-lint ==="
36+
npm run lint
37+
$(VENV)/flake8 --exclude .venv webapp_deploy
38+
$(VENV)/black --check webapp_deploy

0 commit comments

Comments
 (0)