2020-06-15 21:27:41 +02:00
|
|
|
.PHONY: clean publish test docs
|
2017-04-12 16:42:04 +02:00
|
|
|
|
2024-04-13 09:09:17 +02:00
|
|
|
dist:
|
|
|
|
python -m build
|
2017-04-12 16:42:04 +02:00
|
|
|
|
|
|
|
publish :
|
2019-01-02 12:56:53 +01:00
|
|
|
twine upload dist/*.tar.gz dist/*.whl
|
2017-04-16 14:06:16 +02:00
|
|
|
|
2018-06-25 14:27:40 +02:00
|
|
|
test:
|
2019-09-18 21:52:22 +02:00
|
|
|
pytest -v
|
2023-01-01 12:15:51 +01:00
|
|
|
flake8
|
2023-11-18 22:20:06 +01:00
|
|
|
vermin toot
|
2018-06-25 14:27:40 +02:00
|
|
|
|
2017-04-16 14:06:16 +02:00
|
|
|
coverage:
|
2022-11-29 11:25:52 +01:00
|
|
|
coverage erase
|
|
|
|
coverage run
|
2023-12-03 07:07:18 +01:00
|
|
|
coverage html --omit "toot/tui/*"
|
2022-11-29 11:25:52 +01:00
|
|
|
coverage report
|
2017-08-26 15:56:41 +02:00
|
|
|
|
2018-06-25 14:27:40 +02:00
|
|
|
clean :
|
|
|
|
find . -name "*pyc" | xargs rm -rf $1
|
2023-12-05 08:51:09 +01:00
|
|
|
rm -rf build dist MANIFEST htmlcov bundle toot*.tar.gz toot*.pyz
|
2019-09-04 08:39:18 +02:00
|
|
|
|
|
|
|
changelog:
|
|
|
|
./scripts/generate_changelog > CHANGELOG.md
|
2023-03-03 13:52:37 +01:00
|
|
|
cp CHANGELOG.md docs/changelog.md
|
|
|
|
|
|
|
|
docs: changelog
|
|
|
|
mdbook build
|
|
|
|
|
|
|
|
docs-serve:
|
2023-12-07 18:24:06 +01:00
|
|
|
mdbook serve --port 8000
|
2023-03-03 13:52:37 +01:00
|
|
|
|
|
|
|
docs-deploy: docs
|
|
|
|
rsync --archive --compress --delete --stats book/ bezdomni:web/toot
|
2023-12-05 08:51:09 +01:00
|
|
|
|
2023-12-14 12:53:32 +01:00
|
|
|
.PHONY: bundle
|
2023-12-05 08:51:09 +01:00
|
|
|
bundle:
|
|
|
|
mkdir bundle
|
|
|
|
cp toot/__main__.py bundle
|
|
|
|
pip install . --target=bundle
|
|
|
|
rm -rf bundle/*.dist-info
|
|
|
|
find bundle/ -type d -name "__pycache__" -exec rm -rf {} +
|
|
|
|
python -m zipapp \
|
|
|
|
--python "/usr/bin/env python3" \
|
|
|
|
--output toot-`git describe`.pyz bundle \
|
|
|
|
--compress
|
|
|
|
echo "Bundle created: toot-`git describe`.pyz"
|