ci(release): allow for the index rebuild before checking the upload
CI / check (push) Successful in 4m33s

This commit is contained in:
BlackAngelTV committed 2026-11-25 21:44:17 +01:00
1 parent ec42571be5
commit f2f026c748
2 files changed
+22 -7

No files matched your search

+20 -6
View File
@@ -224,15 +224,29 @@ jobs:
# CDN, so a HEAD is not enough: the index and the file can disagree
# for as long as the CDN caches the previous build under this name,
# and the checksum is exactly what pacman verifies before installing.
# A freshly accepted upload is not routable instantly, so an absent
# file is retried before giving up; different bytes are a real
# mismatch and fail at once, since that is what breaks pacman.
url="https://repo.laxacube.ch/x86_64/$PACKAGE_NAME"
expected="$(cut -d' ' -f1 "$PACKAGE_FILE.sha256")"
for _ in 1 2 3 4 5 6; do
if [ "$(curl -fsSL "$url" | sha256sum | cut -d' ' -f1)" = "$expected" ]; then
echo "published $url"
exit 0
code=000
for _ in $(seq 1 24); do
code="$(curl -sS -o "$RUNNER_TEMP/served.pkg" -w '%{http_code}' "$url" || true)"
if [ "$code" = 200 ]; then
served="$(sha256sum "$RUNNER_TEMP/served.pkg" | cut -d' ' -f1)"
if [ "$served" = "$expected" ]; then
echo "published $url"
exit 0
fi
echo "::error::$url serves sha256 $served instead of $expected"
echo "::error::the CDN is still caching another build under this name: purge it before re-running"
exit 1
fi
sleep 5
done
echo "::error::$url does not serve this build (expected sha256 $expected)"
echo "::error::the CDN is probably still caching an older file under this name: purge it before re-running"
if [ "$code" = 404 ]; then
echo "::warning::$url is not visible yet; the repository accepted the upload, pacman will see it once the index is rebuilt"
exit 0
fi
echo "::error::$url answered HTTP $code after the upload"
exit 1
+2 -1
View File
@@ -100,7 +100,8 @@ ce nom de paquet (relancer une release est sans effet), et demande d'incrémente
`pkgrel` pour publier un build différent.
Après l'envoi, il relit aussi le paquet servi et compare son `sha256` à celui du
build, pour ne pas annoncer une publication que les clients ne peuvent pas
installer.
installer. Le fichier met quelques secondes à être routé après l'upload : il est
retenté pendant deux minutes, et une empreinte différente échoue immédiatement.
`pkgver` est la version du fork FWS (fichier `version` à la racine), pas celle
de kitty : la version amont embarquée est dans `_kittyver`.