-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
61 lines (40 loc) · 1.08 KB
/
Makefile
File metadata and controls
61 lines (40 loc) · 1.08 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
58
59
60
61
ifeq (deploy,$(firstword $(MAKECMDGOALS)))
DEPLOY_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
$(eval $(DEPLOY_ARGS):;@:)
endif
ifeq (deploy_current_branch,$(firstword $(MAKECMDGOALS)))
DEPLOY_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
$(eval $(DEPLOY_ARGS):;@:)
endif
.PHONY: venv
venv:
python3.7 -m venv .venv
.PHONY: pip_install
pip_install:
pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
.PHONY: createsuperuser
createsuperuser:
./manage.py createsuperuser
.PHONY: devserve
devserve:
./manage.py runserver
.PHONY: test
test:
./manage.py test --driver Firefox -v
.PHONY: devserve_heroku
devserve_heroku:
heroku local
.PHONY: docs
docs:
./manage.py collectstatic && cd ./docs && make html && cd ..
.PHONY: deploy
deploy:
$(foreach var,$(DEPLOY_ARGS), git push -f se-$(var) master;)
.PHONY: deploy_current_branch
deploy_current_branch:
$(foreach var,$(DEPLOY_ARGS), git push -f se-$(var) `git rev-parse --abbrev-ref HEAD`:master;)
.PHONY: migrate
migrate:
./manage.py migrate