diff --git a/bin/wait_for_pip.sh b/bin/wait_for_pip.sh index c2cba21..1f3d659 100755 --- a/bin/wait_for_pip.sh +++ b/bin/wait_for_pip.sh @@ -3,15 +3,20 @@ VER="$1" echo "Waiting for runlike version $VER to appear on PyPI..." -for tries in {1..15}; do - echo "Attempt $tries/15..." +for tries in {1..30}; do + echo "Attempt $tries/30..." if curl -sf https://pypi.org/pypi/runlike/json | jq -e --arg ver "$VER" '.releases | has($ver)' > /dev/null; then - echo "Version $VER found on PyPI!" - exit 0 + echo "Version $VER found in PyPI index, verifying installability..." + if pip install --dry-run runlike==$VER >/dev/null 2>&1; then + echo "Version $VER is installable from PyPI!" + exit 0 + else + echo "Version $VER found but not yet installable, waiting..." + fi fi - echo "Version $VER not found yet, waiting 5 seconds..." - sleep 5 + echo "Version $VER not ready yet, waiting 10 seconds..." + sleep 10 done -echo "ERROR: Timed out waiting for version $VER to appear on PyPI" +echo "ERROR: Timed out waiting for version $VER to be available on PyPI" exit 1