mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-09-12 19:50:57 +05:00
Wait for installer-visible PyPI release [skip ci]
This commit is contained in:
parent
2450ce0de7
commit
75ae89f984
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user