From fc0d8daaf7f1269b6777660d48df911ecfe79866 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Thu, 12 Oct 2023 17:31:34 +0100 Subject: [PATCH] rpi-update: Retrieve 100 artifact results from Github. Github pages the artifact results, by default only giving the latest 30, but can be increased to 100 per page. If your build has fallen off that list, then tough luck. Ideally we want to iterate through the pages as well by adding &page=N, but that can come later. https://github.com/raspberrypi/rpi-update/issues/21 --- rpi-update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpi-update b/rpi-update index 45a1749..dbaafe7 100755 --- a/rpi-update +++ b/rpi-update @@ -699,7 +699,7 @@ if [[ "${FW_REV}" == "" ]]; then PULL=${ARTIFACT##*/} ARTIFACT=$(eval curl -s "https://api.github.com/repos/raspberrypi/linux/pulls/${PULL}" | awk '/"sha":/ {gsub(/"/, "", $2); gsub(/,/, "", $2); print $2; exit}') else - ARTIFACT=$(eval curl -s "https://api.github.com/repos/raspberrypi/linux/actions/artifacts" | grep -A1 "\"head_branch\": \"${FW_REV_IN}\"" | awk '/"head_sha":/ {gsub(/"/, "", $2); gsub(/,/, "", $2); print $2; exit}') + ARTIFACT=$(eval curl -s "https://api.github.com/repos/raspberrypi/linux/actions/artifacts?per_page=100" | grep -A1 "\"head_branch\": \"${FW_REV_IN}\"" | awk '/"head_sha":/ {gsub(/"/, "", $2); gsub(/,/, "", $2); print $2; exit}') fi else ARTIFACT=${FW_REV_IN}