Files
parsedmarc/build.sh
T

28 lines
603 B
Bash
Executable File

#!/usr/bin/env bash
set -e
if [ ! -d ".venv" ]; then
python3 -m venv .venv || exit
fi
. .venv/bin/activate
pip install .[build]
ruff format .
cd docs
make clean
make html
touch build/html/.nojekyll
if [ -d "../../parsedmarc-docs" ]; then
cp -rf build/html/* ../../parsedmarc-docs/
fi
cd ..
cd parsedmarc/resources/maps
python3 sortlists.py
echo "Checking for invalid UTF-8 bytes in base_reverse_dns_map.csv"
python3 find_bad_utf8.py base_reverse_dns_map.csv
cd ../../..
python3 -m pytest --cov --cov-report=xml --junitxml=junit.xml -o junit_family=legacy tests/
rm -rf dist/ build/
hatch build