From 128333be9c3124daa6f026ffbc42c54a7ea1baa0 Mon Sep 17 00:00:00 2001 From: Scott Gasch Date: Sun, 30 Oct 2022 22:54:40 -0700 Subject: [PATCH] Modify cut_version to check in wheel produced. --- .gitignore | 2 +- cut_version.sh | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 9d23a28..292b437 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ **/__pycache__/ **/pyutils.egg-info -dist/* +dist/*.gz diff --git a/cut_version.sh b/cut_version.sh index 7e40e98..efad099 100755 --- a/cut_version.sh +++ b/cut_version.sh @@ -76,9 +76,21 @@ printf "# 🎁 Release notes (\`$VERSION\`)\n\n## Changes\n$CHANGES\n\n## Metada echo "Updating pyproject.toml with this version number" cat ./pyproject.template | sed s/##VERSION##/$VERSION/g > ./pyproject.toml git commit -a -m "Cut version ${VERSION}" -m "${CHANGES}" -git push echo "Building..." python -m build +WHEEL=dist/pyutils-latest-py3-none-any.whl +if [ ! -f ${WHEEL} ]; then + echo "Can't find ${WHEEL}?!" + exit 1 +fi +LINK=dist/pyutils-latest-py3-none-any.whl +git rm ${LINK} +ln -s ${WHEEL} dist/pyutils-latest-py3-none-any.whl +git add ${WHEEL} +git add ${LINK} +git commit -a -m "Add binary wheel for ${VERSION}" +git push + echo "Done. To upload, run: \"twine upload --verbose --repository testpypi dist/*\"" -- 2.45.2