build(proxy): update fetch-proxy to use the new release assets (#13824)

Proxy releases now include an OS component. This change updates fetch-proxy to
look for both naming variants.
This commit is contained in:
Oliver Gould 2025-03-18 15:52:14 -07:00 committed by GitHub
parent 57dd7f4a60
commit 8947676e68
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 15 additions and 1 deletions

View File

@ -42,7 +42,21 @@ if ! ghcurl "$releases_url" | jq '.[] | select(.name == "'"$version"'")' > relea
exit 1
fi
pkgname=linkerd2-proxy-${version}-${arch}
pkgname_legacy=linkerd2-proxy-${version}-${arch}
pkgname_os=linkerd2-proxy-${version}-${arch}-linux
# First try to find the Linux-specific package in the release assets
if jq -e '.assets[] | select(.name == "'"${pkgname_os}.tar.gz"'")' release.json > /dev/null; then
pkgname=$pkgname_os
else
# Fall back to the legacy package name
if jq -e '.assets[] | select(.name == "'"${pkgname_legacy}.tar.gz"'")' release.json > /dev/null; then
pkgname=$pkgname_legacy
else
echo "Neither ${pkgname_os}.tar.gz nor ${pkgname_legacy}.tar.gz found in release assets" >&2
exit 1
fi
fi
pkgfile=${pkgname}.tar.gz
pkgurl=$(jq -r '.assets[] | select(.name == "'"$pkgfile"'") | .url' release.json)