This repository has been archived by the owner on Apr 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
143 lines (119 loc) · 4.92 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
all: setup_py setup_coveralls setup_js setup_django
ci: setup_ci settings_ci all
create-staging:
virtualenv ~/env
~/env/bin/pip install -r requirements.txt
mkdir -p ~/webfiles/static
mkdir -p ~/webfiles/media
create-production:
virtualenv ~/env
~/env/bin/pip install -r requirements.txt
mkdir -p ~/webfiles/static
mkdir -p ~/webfiles/media
cp timtec/settings_local_production.py timtec/settings_local.py
cp ../settings_production.py timtec/settings_production.py
~/env/bin/pip install -r requirements.txt
~/env/bin/python manage.py syncdb --noinput --no-initial-data
~/env/bin/python manage.py migrate --noinput --no-initial-data
~/env/bin/python manage.py loaddata production
~/env/bin/python manage.py collectstatic --noinput
~/env/bin/python manage.py compilemessages
~/env/bin/python manage.py create_student_and_professor
touch ~/wsgi-reload
update-test:
dropdb timtec-test
createdb timtec-test
pg_restore -O -x -n public -d timtec-test ~hacklab/sql-backup/last.psqlc
cp timtec/settings_local_test.py timtec/settings_local.py
~/env/bin/pip install -r requirements.txt
~/env/bin/python manage.py syncdb --noinput
~/env/bin/python manage.py migrate --noinput
~/env/bin/python manage.py collectstatic --noinput
~/env/bin/python manage.py compilemessages
rm -rf ~/webfiles/media/
cp -r ~timtec-production/webfiles/media ~/webfiles/
touch ~/wsgi-reload
update-dev:
dropdb timtec-dev
createdb timtec-dev
pg_restore -O -x -n public -d timtec-dev ~hacklab/sql-backup/last.psqlc
cp timtec/settings_local_timtec_dev.py timtec/settings_local.py
~/env/bin/pip install -r requirements.txt
~/env/bin/python manage.py syncdb --noinput
~/env/bin/python manage.py migrate --noinput
~/env/bin/python manage.py collectstatic --noinput -c
~/env/bin/python manage.py compilemessages
rm -rf ~/webfiles/media/
cp -r ~timtec-production/webfiles/media ~/webfiles/
touch ~/wsgi-reload
update-staging:
dropdb timtec-staging
createdb timtec-staging
pg_restore -O -x -n public -d timtec-staging ~hacklab/sql-backup/last.psqlc
cp timtec/settings_local_staging.py timtec/settings_local.py
~/env/bin/pip install -r requirements.txt
~/env/bin/python manage.py syncdb --noinput
~/env/bin/python manage.py migrate --noinput
~/env/bin/python manage.py collectstatic --noinput
~/env/bin/python manage.py compilemessages
rm -rf ~/webfiles/media/
cp -r ~timtec-production/webfiles/media ~/webfiles/
touch ~/wsgi-reload
update-design:
dropdb timtec-design
createdb timtec-design
pg_restore -O -x -n public -d timtec-design ~hacklab/sql-backup/last.psqlc
cp timtec/settings_local_design.py timtec/settings_local.py
~/env/bin/pip install -r requirements.txt
~/env/bin/python manage.py syncdb --noinput
~/env/bin/python manage.py migrate --noinput
~/env/bin/python manage.py collectstatic --noinput
~/env/bin/python manage.py compilemessages
rm -rf ~/webfiles/media/
cp -r ~timtec-production/webfiles/media ~/webfiles/
touch ~/wsgi-reload
staging: create-staging update-staging
update-production:
cp timtec/settings_local_production.py timtec/settings_local.py
~/env/bin/pip install -r requirements.txt
~/env/bin/python manage.py syncdb --noinput
~/env/bin/python manage.py migrate --noinput
~/env/bin/python manage.py collectstatic --noinput
~/env/bin/python manage.py compilemessages
cp ../settings_production.py timtec/settings_production.py
touch ~/wsgi-reload
test_collectstatic: clean
python manage.py collectstatic --noinput -n
clean:
find . -type f -name '*.py[co]' -exec rm {} \;
python_tests: clean
py.test --pep8 --flakes --tb=native --cov . . $*
js_tests:
find . -path ./bower_components -prune -o -path bower_components/ -prune -o -path ./node_modules -prune -o -path ./static/js/vendor -prune -o -path static/js/vendor/ -prune -o -name '*.js' -exec jshint {} \;
karma_tests:
karma start confkarma.js $*
all_tests: clean test_collectstatic python_tests karma_tests js_tests
setup_ci:
psql -c 'create database timtec_ci;' -U postgres
setup_py:
pip install -q -r requirements.txt
pip install -q -r dev-requirements.txt
python setup.py -q develop
setup_coveralls:
pip install -q coveralls
setup_js:
sudo `which npm` -g install less yuglify karma karma-cli karma-phantomjs-launcher karma-jasmine jshint ngmin grunt-cli --loglevel silent
sudo npm install grunt grunt-angular-gettext
setup_django: clean
python manage.py syncdb --all --noinput
python manage.py compilemessages
settings_ci:
cp timtec/settings_local_ci.py timtec/settings_local.py
dumpdata: clean
python manage.py dumpdata --indent=2 -n -e south.migrationhistory -e admin.logentry -e socialaccount.socialaccount -e socialaccount.socialapp -e sessions.session -e contenttypes.contenttype -e auth.permission -e account.emailconfirmation -e socialaccount.socialtoken
reset_db: clean
python manage.py reset_db --router=default --noinput -U $(USER)
python manage.py syncdb --all --noinput
python manage.py migrate --noinput --fake
messages: clean
python manage.py makemessages -a -d django