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

+6
View File
@@ -793,6 +793,12 @@ install_deb() {
else
url=$(curl -fsSL "https://api.github.com/repos/$repo/releases/latest" 2>/dev/null \
| awk -F'"' -v m="$match" '/browser_download_url/ && index($4,m) {print $4; exit}')
# A distro build can stop at some release: ghostty-ubuntu 1.4.0
# ships 26.04 and later only, so `latest` has no 24.04 asset and
# the newest one that does is 1.3.1. The list is newest first, so
# the first match is the newest release built for this machine.
[ -n "$url" ] || url=$(curl -fsSL "https://api.github.com/repos/$repo/releases?per_page=30" 2>/dev/null \
| awk -F'"' -v m="$match" '/browser_download_url/ && index($4,m) {print $4; exit}')
[ -n "$url" ] || { note_fail "$(keyof deb "$s")" "no release asset matching *$match*"; continue; }
fi ;;
esac