Skip to content

Commit

Permalink
[ci] resolve shellcheck errors in .ci/check_python_dists.sh (#6503)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunal-Singh-Dadhwal authored Jul 4, 2024
1 parent 83df24d commit a8b7078
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .ci/check_python_dists.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

set -e -E -u
set -e -u

DIST_DIR=${1}

Expand All @@ -24,7 +24,7 @@ if { test "${TASK}" = "bdist" || test "${METHOD}" = "wheel"; }; then
fi

PY_MINOR_VER=$(python -c "import sys; print(sys.version_info.minor)")
if [ $PY_MINOR_VER -gt 7 ]; then
if [ "$PY_MINOR_VER" -gt 7 ]; then
echo "pydistcheck..."
pip install 'pydistcheck>=0.7.0'
if { test "${TASK}" = "cuda" || test "${METHOD}" = "wheel"; }; then
Expand All @@ -34,22 +34,22 @@ if [ $PY_MINOR_VER -gt 7 ]; then
--ignore 'distro-too-large-compressed' \
--max-allowed-size-uncompressed '100M' \
--max-allowed-files 800 \
${DIST_DIR}/* || exit 1
elif { test $(uname -m) = "aarch64"; }; then
"$(echo ${DIST_DIR}/*)" || exit 1
elif { test "$(uname -m)" = "aarch64"; }; then
pydistcheck \
--inspect \
--ignore 'compiled-objects-have-debug-symbols' \
--max-allowed-size-compressed '5M' \
--max-allowed-size-uncompressed '15M' \
--max-allowed-files 800 \
${DIST_DIR}/* || exit 1
"$(echo ${DIST_DIR}/*)" || exit 1
else
pydistcheck \
--inspect \
--max-allowed-size-compressed '5M' \
--max-allowed-size-uncompressed '15M' \
--max-allowed-files 800 \
${DIST_DIR}/* || exit 1
"$(echo ${DIST_DIR}/*)" || exit 1
fi
else
echo "skipping pydistcheck (does not support Python 3.${PY_MINOR_VER})"
Expand Down

0 comments on commit a8b7078

Please sign in to comment.