43 lines
1.2 KiB
Makefile
43 lines
1.2 KiB
Makefile
PYTHON=env/bin/python
|
|
DROPZONE=5.7.0
|
|
|
|
test:
|
|
coverage run --include "app/*" --omit "*/migrations/*" app/manage.py test app
|
|
coverage html
|
|
coverage report
|
|
|
|
dev-setup:
|
|
env/bin/pip install -r requirements.txt
|
|
env/bin/pip install -r dev-requirements.txt
|
|
${PYTHON} manage.py migrate
|
|
${PYTHON} manage.py createsuperuser --username admin --email admin@localhost
|
|
|
|
upgrade:
|
|
${PYTHON} manage.py migrate
|
|
${PYTHON} manage.py collectstatic
|
|
${MAKE} libraries
|
|
|
|
libraries: static/dropzone static/fonts/Quicksand_Book.otf
|
|
|
|
static/dropzone:
|
|
wget -O dropzone-${DROPZONE}.zip https://github.com/enyo/dropzone/archive/v${DROPZONE}.zip
|
|
unzip dropzone-${DROPZONE}.zip
|
|
mv dropzone-${DROPZONE}/dist static/dropzone
|
|
rm -rf dropzone-${DROPZONE} dropzone-${DROPZONE}.zip
|
|
|
|
static/fonts/Quicksand_Book.otf:
|
|
wget -O quicksand.zip https://dl.dafont.com/dl/?f=quicksand
|
|
mkdir -p static/fonts
|
|
unzip -d static/fonts quicksand.zip
|
|
rm quicksand.zip
|
|
|
|
start_s3_storage:
|
|
test -f teststore/pid && ${MAKE} stop_s3_storage || true
|
|
mkdir -p teststore
|
|
MINIO_ACCESS_KEY=polyphonic_test_key MINIO_SECRET_KEY=polyphonic_secret minio server teststore & echo "$$!" > teststore/pid
|
|
cat teststore/pid
|
|
|
|
stop_s3_storage:
|
|
kill `cat teststore/pid` | true
|
|
rm teststore/pid
|