forked from OWASP/OpenCRE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (29 loc) · 1006 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
.ONESHELL:
.PHONY: dev-run run test covers install-deps dev docker lint frontend clean all
prod-run:
cp cres/db.sqlite standards_cache.sqlite; gunicorn cre:app --log-file=-
dev-run:
. ./venv/bin/activate && FLASK_APP=cre.py FLASK_CONFIG=development flask run
test:
. ./venv/bin/activate &&\
FLASK_APP=cre.py FLASK_CONFIG=testing flask test &&\
yarn test --passWithNoTests
cover:
. ./venv/bin/activate && FLASK_APP=cre.py FLASK_CONFIG=testing flask test --coverage
install-deps:
. ./venv/bin/activate; pip install -r requirements.txt& yarn install
install:
virtualenv venv && . ./venv/bin/activate && make install-deps && yarn build
docker:
docker build -f Dockerfile-dev -t opencre:$(shell git rev-parse HEAD) .
docker-run:
docker run -it -p 5000:5000 opencre:$(shell git rev-parse HEAD)
lint:
black .
frontend:
yarn build
clean:
find . -type f -name '*.pyc' -delete
find . -type f -name '*.log' -delete
find . -type f -name '*.orig' -delete
all: clean lint test dev dev-run