mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-09-19 01:51:21 +08:00
ci: drop pagination and head pipe in asset URL lookup
Addresses review feedback: `gh api | head -n1` can fail under bash pipefail because head closes the pipe early and SIGPIPEs gh api. The tag_name + asset-name filter already returns a single URL, so drop --paginate and the head pipe.
This commit is contained in:
@@ -92,9 +92,10 @@ jobs:
|
||||
# releases too (browser /releases/download/... URLs 404 on drafts).
|
||||
# The installer passes Accept: application/octet-stream + bearer
|
||||
# auth, which is what the API asset endpoint expects.
|
||||
URL=$(gh api --paginate "repos/${{ github.repository }}/releases" \
|
||||
--jq ".[] | select(.tag_name == \"v${VERSION}\") | .assets[] | select(.name == \"kilo-linux-x64.tar.gz\") | .url" \
|
||||
| head -n1)
|
||||
# The tag_name filter yields at most one release and one asset,
|
||||
# so --jq returns a single URL without needing head/pipefail games.
|
||||
URL=$(gh api "repos/${{ github.repository }}/releases" \
|
||||
--jq ".[] | select(.tag_name == \"v${VERSION}\") | .assets[] | select(.name == \"kilo-linux-x64.tar.gz\") | .url")
|
||||
if [[ -z "$URL" ]]; then
|
||||
echo "::error::asset kilo-linux-x64.tar.gz not found for v${VERSION}"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user