forked from osohq/gitclub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (26 loc) · 817 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
null :=
space := $(null) #
colon := :#
POLICIES := $(subst ${space},${colon},$(wildcard app/*.polar))
dev: .make.requirements-install
FLASK_DEBUG=1 FLASK_RUN_EXTRA_FILES="${POLICIES}" flask run --port=5000
run: .make.requirements-install
flask run
test-server: .make.requirements-test
FLASK_APP="app:create_app('sqlite:///test.db', False)" flask run
.make.requirements-install: venv-source requirements.txt
pip install -r requirements.txt
touch $@
venv:
python3 -m venv venv
venv-source: venv
. venv/bin/activate
.make.requirements-test: requirements-dev.txt .make.requirements-install venv-source
pip install -r requirements-dev.txt
touch $@
fixtures: .make.requirements-install
rm -f roles.db
FLASK_APP="app:create_app(None, True)" flask run
fmt:
black .
.PHONY: dev run fixtures venv-source