is_click_predictor / upload_package.sh
chkp-talexm
update
4c6a68b
raw
history blame contribute delete
906 Bytes
#!/bin/bash
echo "πŸš€ Starting the PIP package build & upload process..."
# Step 1: Ensure required tools are installed
echo "βœ… Installing required dependencies (setuptools, wheel, twine)..."
pip install --upgrade setuptools wheel twine
# Step 2: Remove old build directories
echo "πŸ—‘οΈ Cleaning old builds..."
rm -rf dist build *.egg-info
# Step 3: Build the package
echo "πŸ“¦ Building the package..."
python setup.py sdist bdist_wheel
# Step 4: Ask user where to upload
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."