ci: AppImage tools from the Forgejo mirror (sha256-checked) into ~/.cache/tauri; GitHub release assets fail too often

This commit is contained in:
CRTkafa 2026-11-08 18:20:36 +07:00
parent c1bed9440e
commit 7e362ef962
3 changed files with 17 additions and 0 deletions

13
tools/ci-tauri-tools.sh Executable file
View file

@ -0,0 +1,13 @@
#!/usr/bin/env bash
# Puts the AppImage tools Tauri's bundler would download from GitHub releases (which answer 502/504 now and then) into
# ~/.cache/tauri from our Forgejo package mirror, checked against its SHA256SUMS. Tauri skips the download when they exist.
set -eu
B="${TAURI_TOOLS_MIRROR:-https://git.crt.fyi/api/packages/CRT/generic/tauri-linux-tools/2026.11.08}"
D="$HOME/.cache/tauri"; mkdir -p "$D"; cd "$D"
curl -fsSL --retry 3 --max-time 60 -o SHA256SUMS "$B/SHA256SUMS"
while read -r sum f; do
f="${f#\*}"
if ! echo "$sum $f" | sha256sum -c --status 2>/dev/null; then curl -fsSL --retry 3 --max-time 300 -o "$f" "$B/$f"; echo "$sum $f" | sha256sum -c --status; fi
chmod +x "$f"
done < SHA256SUMS
rm -f SHA256SUMS; ls "$D"