File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -159,12 +159,12 @@ jobs:
159159 set +e
160160 for attempt in 1 2 3; do
161161 echo "Attempt $attempt: Fetching tinyuf2 release info for board $BOARD_NAME"
162- API_RESPONSE=$(curl --silent --fail https://api.github.com/repos/ adafruit/tinyuf2/releases/latest )
162+ API_RESPONSE=$(gh release view --repo adafruit/tinyuf2 --json assets )
163163 if [ $? -ne 0 ]; then
164164 echo "Attempt $attempt: curl failed to fetch release info."
165165 if [ "$attempt" -eq 3 ]; then exit 1; else sleep $((60 + RANDOM % 40)); continue; fi
166166 fi
167- DOWNLOAD_URL=$(echo "$API_RESPONSE" | jq -r '.assets[] | select(.browser_download_url | contains("tinyuf2-'$BOARD_NAME'-") and endswith(".zip")) | .browser_download_url // empty'); JQ_EXIT=$?
167+ DOWNLOAD_URL=$(echo "$API_RESPONSE" | jq -r '.assets[] | select(.url | contains("tinyuf2-'$BOARD_NAME'-") and endswith(".zip")) | .url // empty'); JQ_EXIT=$?
168168 if [ $JQ_EXIT -ne 0 ] || [ -z "$DOWNLOAD_URL" ]; then
169169 echo "Attempt $attempt: jq failed or no matching zip found."
170170 if [ "$attempt" -eq 3 ]; then exit 1; else sleep $((60 + RANDOM % 40)); continue; fi
You can’t perform that action at this time.
0 commit comments