From 8ea3e9c4de99d390f0cdd1677946db2c880d9308 Mon Sep 17 00:00:00 2001 From: Virtual Maker <56232456+virtual-maker@users.noreply.github.com> Date: Wed, 1 Jan 2025 21:34:21 +0100 Subject: [PATCH] Further fixes and debug messages --- .../workflows/.ci_scripts/compile-arduino-sketches.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/.ci_scripts/compile-arduino-sketches.sh b/.github/workflows/.ci_scripts/compile-arduino-sketches.sh index b5975b36f..8397c4030 100644 --- a/.github/workflows/.ci_scripts/compile-arduino-sketches.sh +++ b/.github/workflows/.ci_scripts/compile-arduino-sketches.sh @@ -1,5 +1,4 @@ #!/bin/bash -result=0 # Fully Qualified Board Name (FQBN) of the board to compile for FQBN="$1" # "arduino:avr:uno" @@ -23,6 +22,7 @@ cat "$BLACKLIST_FILE" echo "" # Find all .ino files and compile each one, excluding those in the blacklist +exit_result=0 find "$SKETCHES" -name "*.ino" | while read sketch; do if ! grep -Fxq "$sketch" "$BLACKLIST_FILE"; then echo "Compiling $sketch" @@ -31,9 +31,9 @@ find "$SKETCHES" -name "*.ino" | while read sketch; do echo "compile_result: $compile_result" if [ $compile_result -ne 0 ]; then echo "Compilation failed for $sketch" - result=1 + exit_result=1 fi - echo "result: $result" + echo "result: exit_result" else echo "Skipping $sketch (blacklisted)" @@ -41,8 +41,8 @@ find "$SKETCHES" -name "*.ino" | while read sketch; do done # Exit with error state -echo "result: $result" -exit $result +echo "result: $exit_result" +exit $exit_result #if [ $result -ne 0 ]; then # exit 1