Skip to content

Commit

Permalink
Fix publishing wheels for legacy package neo4j-driver (#1139)
Browse files Browse the repository at this point in the history
  • Loading branch information
robsdedude authored Feb 5, 2025
1 parent 05e16fe commit 982d86b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
4 changes: 4 additions & 0 deletions bin/check-dist
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ else
|| check_file "${DIST}/${PACKAGE}-${VERSION}.tar.gz"); then
STATUS=1
fi
if ! (check_file "${DIST}/${NORMALIZED_PACKAGE}-${VERSION}-py3-none-any.whl" \
|| check_file "${DIST}/${PACKAGE}-${VERSION}-py3-none-any.whl"); then
STATUS=1
fi
done
fi

Expand Down
23 changes: 11 additions & 12 deletions bin/release
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ 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"
Expand All @@ -31,18 +32,16 @@ for PACKAGE in "neo4j-driver" "neo4j"; do
echo "Source distribution file for ${PACKAGE} not found"
exit 1
fi
done

NORMALIZED_PACKAGE="$(normalize_dist_name "neo4j")"
if check_file "${DIST}/${NORMALIZED_PACKAGE}-${VERSION}-py3-none-any.whl"
then
TWINE_ARGS="${TWINE_ARGS} ${DIST}/${NORMALIZED_PACKAGE}-${VERSION}-py3-none-any.whl"
elif check_file "${DIST}/${PACKAGE}-${VERSION}-py3-none-any.whl"; then
TWINE_ARGS="${TWINE_ARGS} ${DIST}/${PACKAGE}-${VERSION}-py3-none-any.whl"
else
echo "Wheel distribution file for ${PACKAGE} not found"
exit 1
fi

if check_file "${DIST}/${NORMALIZED_PACKAGE}-${VERSION}-py3-none-any.whl"
then
TWINE_ARGS="${TWINE_ARGS} ${DIST}/${NORMALIZED_PACKAGE}-${VERSION}-py3-none-any.whl"
elif check_file "${DIST}/${PACKAGE}-${VERSION}-py3-none-any.whl"; then
TWINE_ARGS="${TWINE_ARGS} ${DIST}/${PACKAGE}-${VERSION}-py3-none-any.whl"
else
echo "Wheel distribution file for ${PACKAGE} not found"
exit 1
fi
done

twine upload ${TWINE_ARGS}

0 comments on commit 982d86b

Please sign in to comment.