Improve bundle command

* directly save to desired file name
* add version number to file name
* remove __pycache__ folders before bundling
* compress the archive
This commit is contained in:
Ivan Habunek 2020-09-03 11:01:52 +02:00
parent 5b200a2cb7
commit ac37f179ef
No known key found for this signature in database
GPG Key ID: CDBD63C43A30BB95

View File

@ -13,8 +13,11 @@ bundle:
cp twitchdl/__main__.py bundle
pip install . --target=bundle
rm -rf bundle/*.dist-info
python -m zipapp -p "/usr/bin/env python3" bundle
mv bundle.pyz twitchdl.pyz
find bundle/ -type d -name "__pycache__" -exec rm -rf {} +
python -m zipapp \
--python "/usr/bin/env python3" \
--output twitch-dl.`git describe`.pyz bundle \
--compress
publish :
twine upload dist/*.tar.gz dist/*.whl