fix: a gh: deb missing from the latest release comes from the newest one that has it

ghostty-ubuntu 1.4.0 builds for 26.04 and later only, so apps/ghostty
failed on every fresh 24.04 box with "no release asset matching". Fall back
to the release list, newest first.
This commit is contained in:
bcherb2 committed 2026-11-18 02:45:18 -05:00
1 parent 0a5ec74fa5
commit d8b0e22052
3 files changed
+25

No files matched your search

+9
View File
@@ -82,6 +82,15 @@ https://github.com/ryanoasis/nerd-fonts/releases/latest/download/*.tar.xz)
tar -cJf - -C "$d" . | emit; rm -rf "$d"; exit 0 ;;
*go.dev/VERSION*)
echo go1.99.0; exit 0 ;;
# ghostty-ubuntu's shape after 1.4.0: the latest release builds only for newer
# Ubuntu, and the asset for this machine's release is in an older one.
*api.github.com/repos/mkasberg/ghostty-ubuntu/releases/latest)
echo ' "browser_download_url": "https://example.invalid/ghostty_9.9-0.ppa1_amd64_99.99.deb"'; exit 0 ;;
*api.github.com/repos/mkasberg/ghostty-ubuntu/releases[?]*)
v=$( . /etc/os-release 2>/dev/null; printf '%s' "${VERSION_ID:-}" )
echo ' "browser_download_url": "https://example.invalid/ghostty_9.9-0.ppa1_amd64_99.99.deb"'
echo " \"browser_download_url\": \"https://example.invalid/ghostty_9.8-0.ppa1_amd64_$v.deb\""
echo " \"browser_download_url\": \"https://example.invalid/ghostty_9.7-0.ppa1_amd64_$v.deb\""; exit 0 ;;
*api.github.com*)
echo ' "browser_download_url": "https://example.invalid/fake_amd64.deb"'; exit 0 ;;
+10
View File
@@ -1232,6 +1232,16 @@ is "a failed download installs nothing" "0" \
"$(grep -c 'apt-get install -y .*\.deb' "$LOG" || true)"
has "…and is reported against the package" "apps/chrome" "$out"
# ghostty-ubuntu 1.4.0 dropped the 24.04 build, so `latest` carries no asset
# for this machine and apps/ghostty failed on every fresh 24.04 box. The newest
# release that does carry one is what gets installed.
GHV=$( . /etc/os-release 2>/dev/null; printf '%s' "${VERSION_ID:-}" )
newbox; pick apps/ghostty
out=$(box install 2>&1 | plain || true)
has "a gh: deb missing from latest comes from the newest release that has it" \
"https://example.invalid/ghostty_9.8-0.ppa1_amd64_$GHV.deb" "$(cat "$LOG")"
hasnt "…and is not reported as missing" "no release asset matching" "$out"
printf '\n\033[1mthe neovim tarball lands where the symlink points\033[0m\n'
# Four commands name the same directory: the rm, the mkdir, tar's -C, and the
# symlink's target. A typo in any one of them installs nothing and leaves a