Skip to content

Commit

Permalink
adjust script
Browse files Browse the repository at this point in the history
  • Loading branch information
Matteo Crippa committed Apr 19, 2024
1 parent 1988d52 commit 2c72ec7
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,22 @@ jobs:
["esp8266"]="0x0000_firmware"
["geekmagic-smalltv"]="0x0000_firmware"
["esp32"]="0x10000_firmware 0x1000_bootloader 0x8000_partitions"
["esp32-s2"]="0x10000_firmware 0x0000_bootloader 0x8000_partitions"
["esp32-s3"]="0x10000_firmware 0x0000_bootloader 0x8000_partitions"
["lilygo-t-display-s3"]="0x10000_firmware 0x0000_bootloader 0x8000_partitions"
["esp32-s2"]="0x10000_firmware 0x1000_bootloader 0x8000_partitions"
["esp32-s3"]="0x10000_firmware 0x1000_bootloader 0x8000_partitions"
["lilygo-t-display-s3"]="0x10000_firmware 0x1000_bootloader 0x8000_partitions"
)
# Iterate through each board and copy corresponding files
for board in "${!board_map[@]}"; do
address_prefix=$(echo "${board_map[$board]}" | cut -d'_' -f1)
for file_type in ${board_map[$board]}; do
find .pio/build -path "*${board}*" -name "${file_type}.bin" -exec sh -c 'cp "{}" "artifacts/'"${address_prefix}_${file_type}.bin"' \;
done
if [ ! -d ".pio/build/$board" ]; then
continue
fi
for address in ${board_map[$board]}; do
address_prefix=$(echo $address | cut -d'_' -f1)
file_type=$(echo $address | cut -d'_' -f2)
find .pio/build -name "${file_type}.bin" -exec sh -c 'cp "{}" "artifacts/'"${address_prefix}_${file_type}_${board}"'_$(basename $(dirname {})).bin"' \;
done
rm -rf .pio/build/$board
done
working-directory: ${{ github.workspace }}

Expand Down

0 comments on commit 2c72ec7

Please sign in to comment.