51 lines
1.3 KiB
Makefile
51 lines
1.3 KiB
Makefile
PYTHON=env/bin/python
|
|
DROPZONE=5.7.0
|
|
|
|
test:
|
|
poetry run coverage run --include "polyphonic/*" --omit "*/migrations/*" polyphonic/manage.py test polyphonic
|
|
poetry run coverage html
|
|
poetry run coverage report
|
|
|
|
check:
|
|
poetry run ruff check polyphonic
|
|
poetry run ruff format --check polyphonic
|
|
|
|
pre-commit: check test
|
|
|
|
build:
|
|
poetry build
|
|
|
|
dev-setup:
|
|
poetry install --with=dev
|
|
poetry run manage migrate
|
|
poetry run manage createsuperuser --username admin --email admin@localhost
|
|
|
|
upgrade:
|
|
poetry run manage migrate
|
|
poetry run manage 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
|