From 392cdff5c2bb43e82acb0dffe435729ca1da0590 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Tue, 26 Jan 2021 01:55:20 +0100 Subject: [PATCH] [Release] Fix python post release script --- dev/release/post-10-python.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/dev/release/post-10-python.sh b/dev/release/post-10-python.sh index 0f7a480cde6..9e30bd4b4e2 100755 --- a/dev/release/post-10-python.sh +++ b/dev/release/post-10-python.sh @@ -17,10 +17,11 @@ # specific language governing permissions and limitations # under the License. -set -e +set -ex set -o pipefail SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +: ${TEST_PYPI:=0} if [ "$#" -ne 2 ]; then echo "Usage: $0 " @@ -36,8 +37,15 @@ ${PYTHON:-python} \ ${version} \ ${rc} \ --dest="${tmp}" \ - --package_type=python -twine upload ${tmp}/python-rc/${version}-rc${rc}/*.{whl,tar.gz} + --package_type=python \ + --regex=".*\.(whl|tar\.gz)$" + +if [ ${TEST_PYPI} -gt 0 ]; then + TWINE_ARGS="--repository-url https://test.pypi.org/legacy/" +fi + +twine upload ${TWINE_ARGS} ${tmp}/python-rc/${version}-rc${rc}/*.{whl,tar.gz} + rm -rf "${tmp}" echo "Success! The released PyPI packages are available here:"