Wait for installer-visible PyPI release [skip ci]

This commit is contained in:
Nick Sweeting 2026-08-28 13:14:50 -07:00
parent 2450ce0de7
commit 75ae89f984
No known key found for this signature in database

View File

@ -25,6 +25,18 @@ pypi_release_json() {
"https://pypi.org/pypi/${PYPI_PACKAGE}/$1/json?cache_bust=$(date +%s)-${RANDOM}"
}
pypi_wait_for_release() {
local version="$1"
pypi_release_json "${version}" >/dev/null
for _ in {1..30}; do
"$CURL_BINARY" -fsSL -H 'Cache-Control: no-cache, no-store, max-age=0' -H 'Pragma: no-cache' \
"https://pypi.org/simple/${PYPI_PACKAGE}/?cache_bust=$(date +%s)-${RANDOM}" | \
grep -Fq ">archivebox-${version}-py3-none-any.whl<" && return
sleep 2
done
return 1
}
VERSION="$($UV_BINARY run --no-cache --no-project python - <<'PY'
from pathlib import Path
import json
@ -296,7 +308,7 @@ if [[ "$PYPI_STATE" != complete ]]; then
done
[[ "${#PYPI_ARTIFACTS[@]}" -gt 0 ]]
$UV_BINARY publish --no-cache --trusted-publishing always "${PYPI_ARTIFACTS[@]}"
pypi_release_json "$VERSION" >/dev/null
pypi_wait_for_release "$VERSION"
fi
if [[ "$IS_RC" == true ]]; then