-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·72 lines (52 loc) · 1.61 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
60
61
62
63
64
65
66
67
68
69
70
71
72
DB_NAME = "boarddocuments_db"
TEST_APPS = "accounts" "billing" "committees" "common" "customer_io" "dashboard" "documents" "meetings" "news" "profiles" "registration"
default: info
info:
@echo "Set up development environment using 'make install'"
@echo "Do Not Use on production server!"
install: _settings requirements db end
_settings:
@echo "Emitting local development settings module"
@cp settings/local.py.example settings/local.py
requirements:
@echo "Installing requirements"
@pip install --exists-action=s -r requirements-dev.txt
db: dropdb createdb syncdb migrate loaddata
createdb:
@echo "Creating PostgreSQL database $(DB_NAME)"
@make -i _createdb >> /dev/null
_createdb:
@createdb $(DB_NAME)
dropdb:
@echo "Destroying PostgreSQL database $(DB_NAME)"
@make -i _dropdb >> /dev/null
_dropdb:
@dropdb $(DB_NAME)
syncdb:
@echo "Syncing database"
@python manage.py syncdb --noinput -v 0
migrate:
@echo "Running migrations"
@python manage.py migrate -v 0
loaddata:
@echo "Applying patch to croppy fields module for use with PostgreSQL database"
@echo "Loading additional data fixtures"
@python manage.py loaddata initial_data
@echo "Loading flatpages"
@python manage.py loaddata flatpages
@python manage.py filldb
end:
@echo "You can now run development server using 'make run' command"
run:
@python manage.py runserver
test:
@python manage.py test $(TEST_APPS)
makemessages:
python manage.py makemessages -a
makemessagesjs:
python manage.py makemessages -d djangojs -a
compilemessages:
python manage.py compilemessages
clean:
@echo "Cleaning *.pyc files"
@find . -name "*.pyc" -exec rm -f {} \;