|
#!/bin/bash |
|
|
|
echo "π Starting the PIP package build & upload process..." |
|
|
|
|
|
echo "β
Installing required dependencies (setuptools, wheel, twine)..." |
|
pip install --upgrade setuptools wheel twine |
|
|
|
|
|
echo "ποΈ Cleaning old builds..." |
|
rm -rf dist build *.egg-info |
|
|
|
|
|
echo "π¦ Building the package..." |
|
python setup.py sdist bdist_wheel |
|
|
|
|
|
read -p "Upload to (1) PyPI or (2) TestPyPI? [1/2]: " upload_option |
|
|
|
if [ "$upload_option" == "2" ]; then |
|
echo "π Uploading package to TestPyPI..." |
|
twine upload --repository testpypi dist/* |
|
echo "β
Package uploaded to TestPyPI!" |
|
else |
|
echo "π Uploading package to PyPI..." |
|
twine upload dist/* |
|
echo "β
Package uploaded to PyPI!" |
|
fi |
|
|
|
echo "π Done! Your package is now available online." |
|
|