This repository has been archived by the owner on Dec 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
django.mk
70 lines (55 loc) · 1.65 KB
/
django.mk
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
jenkins: $(SENTINAL) check test flake8
test: $(SENTINAL)
$(MANAGE) test
coverage: $(SENTINAL) flake8
. $(VE)/bin/activate && $(VE)/bin/coverage run --source='$(APP)' $(MANAGE) test \
&& $(VE)/bin/coverage html -d reports --omit='*migrations*,*settings_*,*wsgi*'
$(SENTINAL): $(REQUIREMENTS) $(VIRTUALENV) $(SUPPORT_DIR)*
rm -rf $(VE)
$(SYS_PYTHON) $(VIRTUALENV) --extra-search-dir=$(SUPPORT_DIR) --never-download $(VE)
$(PIP) install wheel==$(WHEEL_VERSION)
$(PIP) install --use-wheel --no-deps --requirement $(REQUIREMENTS)
$(SYS_PYTHON) $(VIRTUALENV) --relocatable $(VE)
touch $(SENTINAL)
flake8: $(SENTINAL)
$(FLAKE8) $(APP) --max-complexity=$(MAX_COMPLEXITY)
runserver: $(SENTINAL) check
$(MANAGE) runserver
migrate: $(SENTINAL) check
$(MANAGE) migrate
check: $(SENTINAL)
$(MANAGE) check
shell: $(SENTINAL)
$(MANAGE) shell_plus
clean:
rm -rf ve
rm -rf media/CACHE
rm -rf reports
rm celerybeat-schedule
rm .coverage
find . -name '*.pyc' -exec rm {} \;
pull:
git pull
make check
make test
make migrate
make flake8
rebase:
git pull --rebase
make check
make test
make migrate
make flake8
collectstatic: $(SENTINAL) check
$(MANAGE) collectstatic --noinput --settings=$(APP).settings_production
compress: $(SENTINAL) check
$(MANAGE) compress --settings=$(APP).settings_production
# run this one the very first time you check
# this out on a new machine to set up dev
# database, etc. You probably *DON'T* want
# to run it after that, though.
install: $(SENTINAL) check test flake8
createdb $(APP)
$(MANAGE) syncdb --noinput
make migrate
.PHONY: clean collectstatic compress install pull rebase shell check migrate runserver flake8 test jenkins