-
Notifications
You must be signed in to change notification settings - Fork 89
/
Makefile
59 lines (43 loc) · 1.23 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
.PHONY: all test flake8 docs up down reset-volume reset rebuild migrate makemigrations
MAKEFLAGS = silent
TEST_COMMAND = $(VIRTUAL_ENV)/bin/django-admin.py
DJANGO_SETTINGS_MODULE = pycon.settings.test
all: flake8 test
test:
$(TEST_COMMAND) test --noinput --settings=$(DJANGO_SETTINGS_MODULE)
flake8:
$(info ----Flake8 report----)
@flake8 pycon
@flake8 symposion
# If 'make docs' fails, try pip installing requirements/docs.txt
docs:
(cd docs; DJANGO_SETTINGS_MODULE=$(DJANGO_SETTINGS_MODULE) make html)
up:
@docker-compose up -d
@docker-compose run web python manage.py migrate
@docker-compose run web python manage.py loaddata fixtures/*.json
@open http://localhost:8000
makemigrations:
@docker-compose run web python manage.py makemigrations
migrate:
@docker-compose run web python manage.py migrate
down:
@docker-compose down
@docker-compose rm
reset-volume:
@docker volume rm pycon_pgdata
rebuild:
@docker-compose build
reset: down rebuild reset-volume up
push-staging:
@git fetch -a
@git checkout staging
@git merge origin/develop
@git checkout develop
@git push origin staging
push-production:
@git fetch -a
@git checkout production
@git merge origin/develop
@git checkout develop
@git push origin production