@@ -186,22 +186,46 @@ vale-sync:
186186version :
187187 uv version --package {{ package}} | awk ' {print $2}'
188188
189- # Verify a PyPi release
189+ # Verify a PyPi release (with retries for index propagation)
190190[script ]
191191verify-pypi version :
192192 tmp_dir=" /tmp/{{ package}} -verify-pypi/venv"
193193 rm -fr " ${tmp_dir}"
194194 mkdir -p " ${tmp_dir}"
195195 uv venv --directory " ${tmp_dir}" --python 3.10 --no-project --no-cache
196- uv pip install --directory " ${tmp_dir}" --no-cache --strict " {{ package}} =={{ version}} "
196+ for i in 1 2 3 4 5 ; do
197+ echo " Attempt $i: Installing {{ package}} =={{ version}} from PyPI..."
198+ if uv pip install --directory " ${tmp_dir}" --no-cache --strict " {{ package}} =={{ version}} " ; then
199+ break
200+ fi
201+ if [ " $i" -lt 5 ]; then
202+ echo " Package not yet available, waiting 10 seconds..."
203+ sleep 10
204+ else
205+ echo " Failed to install after 5 attempts"
206+ exit 1
207+ fi
208+ done
197209 uv run --directory " ${tmp_dir}" --no-project python -c " import {{ module}} ; print({{ module}} .__version__)"
198210
199- # Verify a TestPyPi release
211+ # Verify a TestPyPi release (with retries for index propagation)
200212[script ]
201213verify-testpypi version :
202214 tmp_dir=" /tmp/{{ package}} -verify-testpypi/venv"
203215 rm -fr " ${tmp_dir}"
204216 mkdir -p " ${tmp_dir}"
205217 uv venv --directory " ${tmp_dir}" --python 3.10 --no-project --no-cache --default-index " https://test.pypi.org/simple/" --extra-index-url " https://pypi.org/simple/"
206- uv pip install --directory " ${tmp_dir}" --no-cache --strict --default-index " https://test.pypi.org/simple/" --extra-index-url " https://pypi.org/simple/" " {{ package}} =={{ version}} "
218+ for i in 1 2 3 4 5 ; do
219+ echo " Attempt $i: Installing {{ package}} =={{ version}} from TestPyPI..."
220+ if uv pip install --directory " ${tmp_dir}" --no-cache --strict --default-index " https://test.pypi.org/simple/" --extra-index-url " https://pypi.org/simple/" " {{ package}} =={{ version}} " ; then
221+ break
222+ fi
223+ if [ " $i" -lt 5 ]; then
224+ echo " Package not yet available, waiting 10 seconds..."
225+ sleep 10
226+ else
227+ echo " Failed to install after 5 attempts"
228+ exit 1
229+ fi
230+ done
207231 uv run --directory " ${tmp_dir}" --no-project python -c " import {{ module}} ; print({{ module}} .__version__)"
0 commit comments