forked from scieloorg/scielo-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (27 loc) · 1.12 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
APP_PATH = scielomanager
MANAGE = $(APP_PATH)/manage.py
SETTINGS_TEST = scielomanager.settings_tests
SETTINGS = scielomanager.settings
FIXTURES_DIR = $(APP_PATH)/scielomanager/fixtures
deps:
@pip install -r requirements.txt
@pip install -r requirements-test.txt
clean:
@find . -name "*.pyc" -delete
test: clean
@python $(MANAGE) test --settings=$(SETTINGS_TEST)
dbsetup:
@python $(MANAGE) syncdb --settings=$(SETTINGS)
@python $(MANAGE) loaddata $(FIXTURES_DIR)/groups.json --settings=$(SETTINGS)
loaddata:
@python $(MANAGE) loaddata $(FIXTURES_DIR)/subject_categories.json --settings=$(SETTINGS)
@python $(MANAGE) loaddata $(FIXTURES_DIR)/study_area.json --settings=$(SETTINGS)
dbmigrate:
@python $(MANAGE) migrate --settings=$(SETTINGS)
compilemessages:
@cd $(APP_PATH) && python manage.py compilemessages --settings=$(SETTINGS)
setup: deps dbsetup dbmigrate loaddata compilemessages test refreshsecretkey
upgrade: deps dbmigrate compilemessages test
@python $(MANAGE) sync_perms --settings=$(SETTINGS)
refreshsecretkey:
@sed -e 's:^\(SECRET_KEY\).*$$:\1 = '" '`openssl rand -base64 32`' "':g' -i $(APP_PATH)/settings.py