forked from saxix/django-adminactions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (37 loc) · 1.52 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
VERSION=2.0.0
BUILDDIR='~build'
DJANGO_SETTINGS_MODULE:=demoproject.settings
PYTHONPATH := ${PWD}/demo/:${PWD}
CASPERJS_DIR=${BUILDDIR}/casperjs
PHANTOMJS_DIR=${BUILDDIR}/phantomjs
mkbuilddir:
mkdir -p ${BUILDDIR}
test:
py.test
selenium:
cd demo && ./manage.py test adminactions
locale:
cd adminactions && django-admin.py makemessages -l en
export PYTHONPATH=${PYTHONPATH} && cd adminactions && django-admin.py compilemessages --settings=${DJANGO_SETTINGS_MODULE}
coverage: mkbuilddir
py.test --cov=adminactions --cov-report=html --cov-config=.coveragerc
ci:
@[ "${DJANGO}" = "1.4.x" ] && pip install django==1.4.8 || :
@[ "${DJANGO}" = "1.5.x" ] && pip install django==1.5.4 || :
@[ "${DJANGO}" = "1.6.x" ] && pip install https://www.djangoproject.com/m/releases/1.6/Django-1.6b4.tar.gz || :
@[ "${DJANGO}" = "dev" ] && pip install git+git://github.com/django/django.git || :
@[ "${DBENGINE}" = "pg" ] && pip install -q psycopg2 || :
@pip install -r adminactions/requirements.pip
@python -c "from __future__ import print_function;import django;print('Django version:', django.get_version())"
DISABLE_SELENIUM=1 $(MAKE) coverage
coverage report
clean:
rm -fr ${BUILDDIR} dist *.egg-info .coverage coverage.xml pytest.xml .cache MANIFEST
find . -name __pycache__ -o -name "*.py?" -o -name "*.orig" -prune | xargs rm -rf
find adminactions/locale -name django.mo | xargs rm -f
docs: mkbuilddir
mkdir -p ${BUILDDIR}/docs
sphinx-build -aE docs/source ${BUILDDIR}/docs
ifdef BROWSE
firefox ${BUILDDIR}/docs/index.html
endif