From 25515b526f7c623b7086b6ac75e9171e830d2871 Mon Sep 17 00:00:00 2001 From: Robsdedude Date: Fri, 26 Apr 2024 11:04:30 +0200 Subject: [PATCH] CI: further fix release scripts to work with PEP 625 (#1052) Continuation of https://github.com/neo4j/neo4j-python-driver/pull/1050 --- bin/release | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/bin/release b/bin/release index 2f2844d77..2c3d69af9 100755 --- a/bin/release +++ b/bin/release @@ -17,9 +17,20 @@ if [ "${VERSION}" == "" ] then echo "usage: ${SCRIPT} VERSION" exit 1 -else - source "${ROOT}/bin/dist-functions" - twine upload ${TWINE_ARGS} \ - "${DIST}/neo4j-driver-${VERSION}.tar.gz" \ - "${DIST}/neo4j-${VERSION}.tar.gz" fi + +source "${ROOT}/bin/dist-functions" +for PACKAGE in "neo4j-driver" "neo4j"; do + NORMALIZED_PACKAGE="$(normalize_dist_name "$PACKAGE")" + if check_file "${DIST}/${NORMALIZED_PACKAGE}-${VERSION}.tar.gz" + then + TWINE_ARGS="${TWINE_ARGS} ${DIST}/${NORMALIZED_PACKAGE}-${VERSION}.tar.gz" + elif check_file "${DIST}/${PACKAGE}-${VERSION}.tar.gz"; then + TWINE_ARGS="${TWINE_ARGS} ${DIST}/${PACKAGE}-${VERSION}.tar.gz" + else + echo "Distribution file for ${PACKAGE} not found" + exit 1 + fi +done + +twine upload ${TWINE_ARGS}