62 lines
1.6 KiB
Makefile
62 lines
1.6 KiB
Makefile
# Sigl Build and Test Scripts
|
|
|
|
export FLASK_APP := sigl.factory
|
|
|
|
shell serve db-init db-migrate db-upgrade db-downgrade db-populate : export FLASK_ENV := development
|
|
shell serve db-init db-migrate db-upgrade db-downgrade db-populate : export SIGL_CONFIG := ../config/dev.py
|
|
coverage coverage-html coverage-report test test-wip test-x : export FLASK_ENV := production
|
|
|
|
shell-psql serve-psql export : export FLASK_ENV := development
|
|
shell-psql serve-psql export : export SIGL_CONFIG := ../config/dev-docker.py
|
|
|
|
css :
|
|
npx tailwindcss -i ./src/css/tailwind.css -o static/sigl.dist.css
|
|
|
|
db-init :
|
|
poetry run flask db init
|
|
|
|
db-migrate :
|
|
poetry run flask db migrate
|
|
|
|
db-upgrade :
|
|
poetry run flask db upgrade
|
|
|
|
db-downgrade :
|
|
poetry run flask db downgrade
|
|
|
|
docker :
|
|
docker buildx build --platform=linux/amd64,linux/arm64 . -t asymworks/sigl:latest -t asymworks/sigl:$(shell poetry version -s)
|
|
|
|
docker-deploy:
|
|
docker buildx build --platform=linux/amd64,linux/arm64 . -t asymworks/sigl:latest -t asymworks/sigl:$(shell poetry version -s) --push
|
|
|
|
lint :
|
|
poetry run flake8
|
|
|
|
requirements.txt : poetry.lock
|
|
poetry export -f requirements.txt --without-hashes -o requirements.txt
|
|
|
|
requirements-dev.txt : poetry.lock
|
|
poetry export --dev -f requirements.txt --without-hashes -o requirements-dev.txt
|
|
|
|
serve :
|
|
poetry run python -m sigl
|
|
|
|
shell :
|
|
poetry run flask shell
|
|
|
|
test :
|
|
poetry run python -m pytest tests
|
|
|
|
test-x :
|
|
poetry run python -m pytest tests -x
|
|
|
|
test-wip :
|
|
poetry run python -m pytest tests -m wip
|
|
|
|
.PHONY : css docker docker-deploy \
|
|
db-init db-migrate db-upgrad db-downgrade \
|
|
lint shell serve \
|
|
requirements.txt requirements-dev.txt \
|
|
test test-wip test-x
|