-
-
Notifications
You must be signed in to change notification settings - Fork 72
/
Makefile
73 lines (57 loc) · 1.62 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# How to run Python.
PYTHON = python3
# How to run the management tool.
MANAGE = ${PYTHON} manage.py
all : commands
## commands : show all commands.
commands : Makefile
@sed -n 's/^## //p' $<
## test : run all tests.
test :
${MANAGE} test
## fast_test : run all tests really fast.
fast_test:
${MANAGE} test --keepdb --parallel
## fast_test_fail : run all tests really fast, fails as soon as any test fails.
fast_test_fail:
${MANAGE} test --keepdb --parallel --failfast
## dev_database : re-make database using saved data
dev_database :
${MANAGE} reset_db
${MANAGE} migrate
${MANAGE} loaddata amy/autoemails/fixtures/templates_triggers.json
${MANAGE} fake_database
${MANAGE} createinitialrevisions
${MANAGE} create_superuser
## node_modules : install front-end dependencies using Yarn
node_modules : package.json
yarn install --frozen-lockfile
touch node_modules
## serve : run a server
serve : node_modules
${MANAGE} runserver
## serve_now : run a server now
serve_now :
${MANAGE} runserver
## outdated : show outdated dependencies
outdated :
-${PYTHON} -m pip list --outdated
-yarn outdated
## upgrade : force package upgrade using pip
upgrade :
pip install --upgrade -r requirements.txt
yarn upgrade --frozen-lockfile
## clean : clean up.
clean :
rm -rf \
$$(find . -name '*~' -print) \
$$(find . -name '*.pyc' -print) \
$$(find . -name '__pycache__' -print) \
htmlerror \
$$(find . -name 'test_db*.sqlite3*' -print) \
## build_docs : build static docs in `site`
build_docs :
mkdocs build
## serve_docs : serve docs at `localhost:8000`
serve_docs :
mkdocs serve