-
-
Notifications
You must be signed in to change notification settings - Fork 72
/
Makefile
81 lines (66 loc) · 1.95 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
74
75
76
77
78
79
80
81
# 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 except migration tests.
test :
${MANAGE} test --exclude-tag migration_test
## fast_test : run all tests really fast.
fast_test:
${MANAGE} test --keepdb --parallel --exclude-tag migration_test
## fast_test_fail : run all tests really fast, fails as soon as any test fails.
fast_test_fail:
${MANAGE} test --keepdb --parallel --failfast --exclude-tag migration_test
## test_migrations : test database migrations only
test_migrations:
${MANAGE} test --parallel --tag migration_test
## dev_database : re-make database using saved data
dev_database :
${MANAGE} reset_db --skip-checks
${MANAGE} migrate
${MANAGE} runscript seed_badges
${MANAGE} runscript seed_autoemails
${MANAGE} runscript seed_communityroles
${MANAGE} runscript seed_training_requirements
${MANAGE} runscript seed_involvements
${MANAGE} runscript seed_emails
${MANAGE} create_superuser
${MANAGE} fake_database
${MANAGE} createinitialrevisions
${MANAGE} createcachetable
## node_modules : install front-end dependencies
node_modules : package.json
npm install
touch node_modules
## serve : run a server
serve :
gunicorn \
--workers=1 \
--bind=127.0.0.1:8000 \
--access-logfile - \
--capture-output \
--reload \
--env DJANGO_SETTINGS_MODULE=config.settings \
config.wsgi
## outdated : show outdated dependencies
outdated :
-${PYTHON} -m pip list --outdated
-npm outdated
## 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