diff --git a/.gitignore b/.gitignore index 0237e54..e1f4117 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,10 @@ __pycache__ credentials.json credentials local_settings.py +local.mk .coverage +.lint +.deploy Session.vim poetry.lock /env diff --git a/Dockerfile b/Dockerfile index 51442d7..e5f58c4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ FROM alpine:latest ENV TARGET=/opt/polyphonic -#ENV RELEASE=polyphonic-0.8.4-py3-none-any.whl -ENV RELEASE=git+https://gitea.tfconsulting.com.au/projects/polyphonic.git +ENV RELEASE=polyphonic-0.8.4-py3-none-any.whl +#ENV RELEASE=git+https://gitea.tfconsulting.com.au/projects/polyphonic.git RUN apk add --no-cache python3 py3-pip git ghostscript sqlite @@ -11,7 +11,7 @@ WORKDIR /root RUN python3 -m venv ${TARGET} ENV PATH="${TARGET}/bin:$PATH" -#COPY dist/${RELEASE} . +COPY dist/${RELEASE} . RUN pip3 install ${RELEASE} --no-cache-dir RUN pip3 install gunicorn whitenoise diff --git a/Makefile b/Makefile index bb89001..2384ba9 100644 --- a/Makefile +++ b/Makefile @@ -1,18 +1,32 @@ PYTHON=env/bin/python DROPZONE=5.7.0 -test: +VERSION=0.8.4 + +export DJANGO_SETTINGS_MODULE=polyphonic.config.settings.dev + +-include local.mk + +test: .coverage + +check: .lint + +pre-commit: check test + +.coverage: polyphonic poetry run coverage run --include "polyphonic/*" --omit "*/migrations/*" polyphonic/manage.py test polyphonic poetry run coverage html poetry run coverage report -check: +.lint: polyphonic poetry run ruff check polyphonic poetry run ruff format --check polyphonic + touch $@ -pre-commit: check test -build: +build: dist/polyphonic-${VERSION}-py3-none-any.whl + +dist/polyphonic-${VERSION}-py3-none-any.whl: polyphonic poetry build dev-setup: