-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
57 lines (42 loc) · 1.52 KB
/
Copy pathMakefile
File metadata and controls
57 lines (42 loc) · 1.52 KB
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
MANAGE = ./manage.py
LOCALESDIR = hackingweek/locale
LOCALES = $(LOCALESDIR)/fr/LC_MESSAGES/django.mo
OMITFLAGS = --omit "*tests*","*migrations*"
.PHONY: clean coverage help locales run syncdb test test-dbg
all: syncdb run
run: $(LOCALES)
$(MANAGE) runserver 0.0.0.0:8000
syncdb:
$(MANAGE) syncdb --noinput
$(MANAGE) migrate
test:
$(MANAGE) test
test-dbg:
$(MANAGE) test --verbosity=3
cover:
coverage run $(OMITFLAGS) --source='.' $(MANAGE) test
coverage html
coverall:
coverage run --rcfile='templates.coveragerc' $(OMITFLAGS) --source='.' $(MANAGE) test
DJANGO_SETTINGS_MODULE=hackingweek.settings coverage html --rcfile='templates.coveragerc'
locales:
cd hackingweek/ && django-admin.py makemessages --locale=fr
$(LOCALESDIR)/fr/LC_MESSAGES/django.mo: $(LOCALESDIR)/fr/LC_MESSAGES/django.po
cd hackingweek/ && django-admin.py compilemessages --locale=fr
clean:
@rm -f `find . -name "*.pyc"` .coverage
@rm -rf htmlcov/
distclean: clean
@rm -f $(LOCALES)
help:
@echo "Makefile usage:"
@echo " make [all]\tsync and run the server"
@echo " make run\trun the server"
@echo " make syncdb\tsync the database (and migrate)"
@echo " make locales\tgenerate the locale po files"
@echo " make test\trun the test suite"
@echo " make test-dbg\trun the test suite with high verbosity"
@echo " make cover\trun the test suite on .py files with coverage plugin"
@echo " make coverall\trun the test suite on all files with coverage plugin"
@echo " make clean\tremove unnecessary files"
@echo " make help\tdisplay this help"