Skip to content

Commit dc405f7

Browse files
authored
cleanup tinyuf2 downlaod + error handling
1 parent dda5b6c commit dc405f7

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

.github/workflows/build-clang-doxy.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -145,20 +145,14 @@ jobs:
145145
- name: fetch tinyuf2 combined.bin
146146
run: |
147147
echo "Fetching tinyuf2 bootloader..."
148-
# if [ "${{ matrix.arduino-platform }}" == "funhouse_noota" ]; then
149-
# wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/adafruit_funhouse_esp32s2/tinyuf2-adafruit_funhouse_esp32s2-0.35.0.zip -O tinyuf2.zip
150-
# elif [ "${{ matrix.arduino-platform }}" == "esp32s3_devkitc_1_n8" ]; then
151-
# wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/espressif_esp32s3_devkitc_1/tinyuf2-espressif_esp32s3_devkitc_1-0.35.0.zip -O tinyuf2.zip
152-
# elif [ "${{ matrix.arduino-platform }}" == "xiao_esp32s3" ]; then
153-
# wget https://adafruit-circuit-python.s3.amazonaws.com/bootloaders/esp32/seeed_xiao_esp32s3/tinyuf2-seeed_xiao_esp32s3-0.35.0.zip -O tinyuf2.zip
154-
# fi
155-
156148
DOWNLOAD_URL=$(curl -s https://api.github.com/repos/adafruit/tinyuf2/releases/latest | \
157149
grep -o "\"browser_download_url\": \"[^\"]*tinyuf2-${{fromJson(steps.get_board_json.outputs.boardJson).bootloaderBoardName}}-[^\"]*\.zip\"" | \
158150
cut -d '"' -f 4)
159-
151+
if [ -z "$DOWNLOAD_URL" ]; then
152+
echo "Error: Could not find the latest tinyuf2 release for board ${fromJson(steps.get_board_json.outputs.boardJson).bootloaderBoardName}."
153+
exit 1
154+
fi
160155
wget "$DOWNLOAD_URL" -O tinyuf2.zip
161-
162156
unzip -o tinyuf2.zip -d .
163157
164158
# Copy files where they're expected to make flash_args happy
@@ -170,7 +164,7 @@ jobs:
170164
# Append main app to flash_args file
171165
echo "0x10000 wippersnapper.${{ matrix.arduino-platform }}.fatfs.${{ env.WS_VERSION }}.bin" >> flash_args
172166
173-
# Create new_flash_args with esptool parameters first
167+
# Create new_flash_args with esptool parameters first and output file
174168
echo "--flash-mode ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashMode}}" > new_flash_args
175169
echo "--flash-freq ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashFreq}}" >> new_flash_args
176170
echo "--flash-size ${{fromJson(steps.get_board_json.outputs.boardJson).esptool.flashSize}}" >> new_flash_args

0 commit comments

Comments
 (0)