Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions dev/release/post-10-python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 <version> <rc-num>"
Expand All @@ -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:"
Expand Down