forked from ubc/ubcpi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
60 lines (46 loc) · 1.83 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
.PHONY: docs
env:
pip install virtualenv && \
virtualenv venv && \
. venv/bin/activate && \
make deps
deps:
pip install -r requirements/dev.txt
pip install -r requirements/test.txt
npm install
clean:
find . -name '*.pyc' -exec rm -f {} \;
find . -name '*.pyo' -exec rm -f {} \;
find . -name '*~' -exec rm -f {} \;
rm -rf bower_components node_modules
test: test-py test-js
test-py:
DJANGO_SETTINGS_MODULE=settings.test python manage.py test
test-py-debug:
DJANGO_SETTINGS_MODULE=settings.test python manage.py test -s
test-js:
node_modules/karma/bin/karma start karma.conf.js --single-run
webdriver:
node_modules/protractor/bin/webdriver-manager start
test-acceptance:
node_modules/protractor/bin/protractor protractor.conf.js
tdd:
node_modules/karma/bin/karma start karma.conf.js
workbench:
@echo "Updating the database..."
DJANGO_SETTINGS_MODULE=settings.dev python manage.py syncdb --migrate -v 0
@echo "Starting server..."
DJANGO_SETTINGS_MODULE=settings.dev python manage.py runserver_plus
release:
pandoc --from=markdown --to=rst README.md -o README.rst
python setup.py bdist_egg upload
python setup.py sdist upload
rm README.rst
extract:
find ubcpi/ -iname "*.py" ! -path "ubcpi/test/*" | xargs xgettext --from-code=UTF-8 --default-domain=py --language=Python --force-po --output-dir=build --omit-header
node_modules/.bin/angular-gettext-cli --files './ubcpi/static/**/*.+(js|html)' --exclude '**/*_(spec|steps).js' --dest 'build/static.po'
msgcat build/static.po build/py.po > build/text.po
msgmerge --update ubcpi/translations/en/LC_MESSAGES/text.po build/text.po
compile:
for i in `find ubcpi/translations/ -name *.po`; do msgfmt $$i -o `dirname $$i`/text.mo; done
node_modules/.bin/angular-gettext-cli --compile --files 'ubcpi/translations/**/*.po' --format javascript --dest 'ubcpi/static/js/src/translations.js'