diff --git a/.github/workflows/arduino-test-compile-ActionTest.yml b/.github/workflows/arduino-test-compile-ActionTest.yml index 9dfdd77..a4a4577 100644 --- a/.github/workflows/arduino-test-compile-ActionTest.yml +++ b/.github/workflows/arduino-test-compile-ActionTest.yml @@ -45,7 +45,7 @@ jobs: - arduino:avr:uno - arduino:avr:uno|trace - arduino:avr:uno|All-DEBUG - - digistump:avr:digispark-tiny1 + - digistump:avr:digispark-tiny:clock=clock1 - ATTinyCore:avr:attinyx5:chip=85,clock=1internal - esp8266:esp8266:huzzah:eesz=4M3M,xtal=80 - esp32:esp32:featheresp32:FlashFreq=80 @@ -54,8 +54,8 @@ jobs: ############################################################################################################# include: - arduino-boards-fqbn: arduino:avr:uno - examples-exclude: 50Hz # Comma separated list of (unique substrings of) example names to exclude in build - examples-build-properties: + sketches-exclude: 50Hz # Comma separated list of (unique substrings of) example names to exclude in build + build-properties: WhistleSwitch: -DDEBUG -DFREQUENCY_RANGE_LOW @@ -63,28 +63,28 @@ jobs: -DINFO - arduino-boards-fqbn: arduino:avr:uno|All-DEBUG # UNO board with -DDEBUG for all examples - examples-exclude: 50Hz # Comma separated list of (unique substrings of) example names to exclude in build - examples-build-properties: + sketches-exclude: 50Hz # Comma separated list of (unique substrings of) example names to exclude in build + build-properties: All: -DDEBUG - arduino-boards-fqbn: arduino:avr:uno|trace # UNO board with different build properties arduino-platform: arduino:avr@1.8.1 - examples-exclude: 50Hz # Comma separated list of (unique substrings of) example names to exclude in build - examples-build-properties: + sketches-exclude: 50Hz # Comma separated list of (unique substrings of) example names to exclude in build + build-properties: WhistleSwitch: -DDEBUG -DTRACE - - arduino-boards-fqbn: digistump:avr:digispark-tiny1 # ATtiny85 board @1 MHz + - arduino-boards-fqbn: digistump:avr:digispark-tiny:clock=clock1 # ATtiny85 board @1 MHz platform-url: https://raw.githubusercontent.com/ArminJo/DigistumpArduino/master/package_digistump_index.json - examples-exclude: WhistleSwitch,"Blink" # Comma separated list of (unique substrings of) example names to exclude in build + sketches-exclude: WhistleSwitch,"Blink" # Comma separated list of (unique substrings of) example names to exclude in build - arduino-boards-fqbn: ATTinyCore:avr:attinyx5:chip=85,clock=1internal arduino-platform: digistump:avr,ATTinyCore:avr platform-url: http://drazzy.com/package_drazzy.com_index.json,https://raw.githubusercontent.com/ArminJo/DigistumpArduino/master/package_digistump_index.json - examples-build-properties: + build-properties: WhistleSwitch: -DFREQUENCY_RANGE_LOW @@ -92,11 +92,11 @@ jobs: #" " whis space as separator is deprecated but works also #platform-url: "https://arduino.esp8266.com/stable/package_esp8266com_index.json https://raw.githubusercontent.com/ArminJo/DigistumpArduino/master/package_digistump_index.json" platform-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json - examples-exclude: WhistleSwitch,50Hz,SimpleFrequencyDetector + sketches-exclude: WhistleSwitch,50Hz,SimpleFrequencyDetector - arduino-boards-fqbn: esp32:esp32:featheresp32:FlashFreq=80 platform-url: https://dl.espressif.com/dl/package_esp32_index.json - examples-exclude: WhistleSwitch,50Hz,SimpleFrequencyDetector + sketches-exclude: WhistleSwitch,50Hz,SimpleFrequencyDetector # Do not cancel all jobs / architectures if one job fails fail-fast: false @@ -120,8 +120,8 @@ jobs: arduino-platform: ${{ matrix.arduino-platform }} platform-url: ${{ matrix.platform-url }} required-libraries: ${{ env.REQUIRED_LIBRARIES }} - examples-exclude: ${{ matrix.examples-exclude }} - examples-build-properties: ${{ toJson(matrix.examples-build-properties) }} + sketches-exclude: ${{ matrix.sketches-exclude }} + examples-build-properties: ${{ toJson(matrix.build-properties) }} sketch-names: WhistleSwitch.ino, 50Hz.ino, diff --git a/.github/workflows/arduino-test-compile-ScriptTest.yml b/.github/workflows/arduino-test-compile-ScriptTest.yml index 5706bd1..d9785db 100644 --- a/.github/workflows/arduino-test-compile-ScriptTest.yml +++ b/.github/workflows/arduino-test-compile-ScriptTest.yml @@ -43,18 +43,18 @@ jobs: - arduino:avr:uno - arduino:avr:uno|trace - arduino:avr:uno|All-DEBUG - - digistump:avr:digispark-tiny1 + - digistump:avr:digispark-tiny:clock=clock1 - ATTinyCore:avr:attinyx5:chip=85,clock=1internal - esp8266:esp8266:huzzah:eesz=4M3M,xtal=80 - esp32:esp32:featheresp32:FlashFreq=80 # Specify parameters for each board. - # Parameters can be: examples-exclude and examples-build-properties + # Parameters can be: sketches-exclude and build-properties ############################################################################################################# include: - arduino-boards-fqbn: arduino:avr:uno - examples-exclude: 50Hz # Comma separated list of (unique substrings of) example names to exclude in build - examples-build-properties: + sketches-exclude: 50Hz # Comma separated list of (unique substrings of) example names to exclude in build + build-properties: WhistleSwitch: -DDEBUG -DFREQUENCY_RANGE_LOW @@ -62,38 +62,38 @@ jobs: -DINFO - arduino-boards-fqbn: arduino:avr:uno|All-DEBUG # UNO board with -DDEBUG for all examples - examples-exclude: 50Hz # Comma separated list of (unique substrings of) example names to exclude in build - examples-build-properties: + sketches-exclude: 50Hz # Comma separated list of (unique substrings of) example names to exclude in build + build-properties: All: -DDEBUG - arduino-boards-fqbn: arduino:avr:uno|trace # UNO board with different build properties - examples-exclude: 50Hz # Comma separated list of (unique substrings of) example names to exclude in build - examples-build-properties: + sketches-exclude: 50Hz # Comma separated list of (unique substrings of) example names to exclude in build + build-properties: WhistleSwitch: -DDEBUG -DTRACE - - arduino-boards-fqbn: digistump:avr:digispark-tiny1 # ATtiny85 board @1 MHz + - arduino-boards-fqbn: digistump:avr:digispark-tiny:clock=clock1 # ATtiny85 board @1 MHz platform-url: https://raw.githubusercontent.com/ArminJo/DigistumpArduino/master/package_digistump_index.json - examples-exclude: WhistleSwitch,"Blink" # Comma separated list of (unique substrings of) example names to exclude in build - examples-build-properties: + sketches-exclude: WhistleSwitch,"Blink" # Comma separated list of (unique substrings of) example names to exclude in build + build-properties: SimpleFrequencyDetector: -DINFO - arduino-boards-fqbn: ATTinyCore:avr:attinyx5:chip=85,clock=1internal platform-url: http://drazzy.com/package_drazzy.com_index.json - examples-build-properties: + build-properties: WhistleSwitch: -DFREQUENCY_RANGE_LOW - arduino-boards-fqbn: esp8266:esp8266:huzzah:eesz=4M3M,xtal=80 platform-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json - examples-exclude: WhistleSwitch,50Hz,SimpleFrequencyDetector + sketches-exclude: WhistleSwitch,50Hz,SimpleFrequencyDetector - arduino-boards-fqbn: esp32:esp32:featheresp32:FlashFreq=80 platform-url: https://dl.espressif.com/dl/package_esp32_index.json - examples-exclude: WhistleSwitch,50Hz,SimpleFrequencyDetector + sketches-exclude: WhistleSwitch,50Hz,SimpleFrequencyDetector # Do not cancel all jobs / architectures if one job fails fail-fast: false @@ -116,8 +116,8 @@ jobs: ENV_ARDUINO_BOARD_FQBN: ${{ matrix.arduino-boards-fqbn }} ENV_PLATFORM_URL: ${{ matrix.platform-url }} ENV_REQUIRED_LIBRARIES: ${{ env.REQUIRED_LIBRARIES }} - ENV_EXAMPLES_EXCLUDE: ${{ matrix.examples-exclude }} - ENV_EXAMPLES_BUILD_PROPERTIES: ${{ toJson(matrix.examples-build-properties) }} + ENV_SKETCHES_EXCLUDE: ${{ matrix.sketches-exclude }} + ENV_BUILD_PROPERTIES: ${{ toJson(matrix.build-properties) }} ENV_SKETCH_NAMES: "*.ino" ENV_SKETCH_NAMES_FILE_START: . ENV_SAVE_GENERATED_FILES: true diff --git a/README.md b/README.md index 13b90f1..2a5efd5 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # arduino-test-compile [action](https://github.com/marketplace/actions/test-compile-for-arduino) / script -### Version 2.5.2 +### Version 2.6.0 [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://spdx.org/licenses/MIT.html) [![Build Status](https://github.com/ArminJo/arduino-test-compile/workflows/arduino-test-compile-ActionTest/badge.svg)](https://github.com/ArminJo/arduino-test-compile/actions) @@ -90,31 +90,31 @@ required-libraries: Servo,Adafruit NeoPixel@1.3.4 Comma separated list without double quotes around the list or a library name. A list of correct library names can be found [here](https://www.arduinolibraries.info/). -### `examples-exclude` -Examples to be **excluded from build**. Comma or space separated list of complete sketch / example names to exclude in build.
-Environment name for script usage is `ENV_EXAMPLES_EXCLUDE`. +### `sketches-exclude` +Sketches to be **excluded from build**. Comma or space separated list of complete sketch / example names to exclude in build.
+Environment name for script usage is `ENV_SKETCHES_EXCLUDE`. ```yaml - examples-exclude: QuadrupedControl,RobotArmControl # QuadrupedControl and RobotArmControl because of missing EEprom + sketches-exclude: QuadrupedControl,RobotArmControl # QuadrupedControl and RobotArmControl because of missing EEprom ``` -### `examples-build-properties` +### `build-properties` Build parameter like `-DDEBUG` for each example specified or for all examples, if example name is `All`. If an example specific parameter is specified, the value for All is ignored for this example.
-Environment name for script usage is `ENV_EXAMPLES_BUILD_PROPERTIES`.
+Environment name for script usage is `ENV_BUILD_PROPERTIES`.
In the `include:` section you may specify: ```yaml include: ... - examples-build-properties: + build-properties: WhistleSwitch: -DDEBUG -DFREQUENCY_RANGE_LOW SimpleFrequencyDetector: -DINFO ... - examples-build-properties: + build-properties: All: -DDEBUG ... @@ -124,14 +124,14 @@ and reference it in the `with:` section by: ```yaml with: - examples-build-properties: ${{ toJson(matrix.examples-build-properties) }} + build-properties: ${{ toJson(matrix.build-properties) }} ``` If you want to specify it directly in the `with:` section it must be: ```yaml with: - examples-build-properties: '{ "WhistleSwitch": "-DDEBUG -DFREQUENCY_RANGE_LOW", "SimpleFrequencyDetector": "-DINFO", "All": "-DDEBUG" }' + build-properties: '{ "WhistleSwitch": "-DDEBUG -DFREQUENCY_RANGE_LOW", "SimpleFrequencyDetector": "-DINFO", "All": "-DDEBUG" }' ``` ### `cli-version` @@ -216,8 +216,8 @@ jobs: arduino-board-fqbn: esp8266:esp8266:huzzah:eesz=4M3M,xtal=80 platform-url: https://arduino.esp8266.com/stable/package_esp8266com_index.json required-libraries: Servo,Adafruit NeoPixel - examples-exclude: WhistleSwitch 50Hz - examples-build-properties: '{ "WhistleSwitch": "-DDEBUG -DFREQUENCY_RANGE_LOW", "SimpleFrequencyDetector": "-DINFO" }' + sketches-exclude: WhistleSwitch 50Hz + build-properties: '{ "WhistleSwitch": "-DDEBUG -DFREQUENCY_RANGE_LOW", "SimpleFrequencyDetector": "-DINFO" }' ``` ## One board with 2x2 compile parameter matrix @@ -258,7 +258,7 @@ jobs: arduino-board-fqbn: ${{ matrix.arduino-boards-fqbn }} platform-url: ${{ matrix.platform-url }} required-libraries: ${{ env.REQUIRED_LIBRARIES }} - examples-build-properties: '{ "All": "${{ matrix.log-options }} ${{ matrix.other-options }}" }' + build-properties: '{ "All": "${{ matrix.log-options }} ${{ matrix.other-options }}" }' ``` @@ -291,7 +291,7 @@ jobs: include: - arduino-boards-fqbn: arduino:avr:uno sketch-names: WhistleSwitch.ino,SimpleFrequencyDetector.ino # Comma separated list of sketch names (no path required) or patterns to use in build - examples-build-properties: + build-properties: WhistleSwitch: -DDEBUG -DFREQUENCY_RANGE_LOW @@ -299,20 +299,20 @@ jobs: -DINFO - arduino-boards-fqbn: arduino:avr:uno|All-DEBUG # UNO board with -DDEBUG for all examples - examples-exclude: 50Hz # Comma separated list of (unique substrings of) example names to exclude in build - examples-build-properties: + sketches-exclude: 50Hz # Comma separated list of (unique substrings of) example names to exclude in build + build-properties: All: -DDEBUG - arduino-boards-fqbn: arduino:avr:uno|trace # UNO board with different build properties - examples-exclude: 50Hz # Comma separated list of (unique substrings of) example names to exclude in build - examples-build-properties: + sketches-exclude: 50Hz # Comma separated list of (unique substrings of) example names to exclude in build + build-properties: WhistleSwitch: -DDEBUG -DTRACE - arduino-boards-fqbn: esp8266:esp8266:huzzah:eesz=4M3M,xtal=80 - examples-exclude: WhistleSwitch,50Hz,SimpleFrequencyDetector + sketches-exclude: WhistleSwitch,50Hz,SimpleFrequencyDetector fail-fast: false @@ -328,8 +328,8 @@ jobs: platform-url: ${{ matrix.platform-url }} required-libraries: ${{ env.REQUIRED_LIBRARIES }} sketch-names: ${{ matrix.sketch-names }} - examples-exclude: ${{ matrix.examples-exclude }} - examples-build-properties: ${{ toJson(matrix.examples-build-properties) }} + sketches-exclude: ${{ matrix.sketches-exclude }} + build-properties: ${{ toJson(matrix.build-properties) }} ``` ## Multiple boards with parameter using the **script directly** @@ -363,7 +363,7 @@ jobs: include: - arduino-boards-fqbn: arduino:avr:uno sketch-names: WhistleSwitch.ino,SimpleFrequencyDetector.ino # Comma separated list of sketch names (no path required) or patterns to use in build - examples-build-properties: + build-properties: WhistleSwitch: -DDEBUG -DFREQUENCY_RANGE_LOW @@ -371,20 +371,20 @@ jobs: -DINFO - arduino-boards-fqbn: arduino:avr:uno|All-DEBUG # UNO board with -DDEBUG for all examples - examples-exclude: 50Hz # Comma separated list of (unique substrings of) example names to exclude in build - examples-build-properties: + sketches-exclude: 50Hz # Comma separated list of (unique substrings of) example names to exclude in build + build-properties: All: -DDEBUG - arduino-boards-fqbn: arduino:avr:uno|trace # UNO board with different build properties - examples-exclude: 50Hz # Comma separated list of (unique substrings of) example names to exclude in build - examples-build-properties: + sketches-exclude: 50Hz # Comma separated list of (unique substrings of) example names to exclude in build + build-properties: WhistleSwitch: -DDEBUG -DTRACE - arduino-boards-fqbn: esp8266:esp8266:huzzah:eesz=4M3M,xtal=80 - examples-exclude: WhistleSwitch,50Hz,SimpleFrequencyDetector + sketches-exclude: WhistleSwitch,50Hz,SimpleFrequencyDetector fail-fast: false @@ -398,8 +398,8 @@ jobs: ENV_PLATFORM_DEFAULT_URL: ${{ env.PLATFORM_DEFAULT_URL }} ENV_PLATFORM_URL: ${{ matrix.platform-url }} ENV_REQUIRED_LIBRARIES: ${{ env.REQUIRED_LIBRARIES }} - ENV_EXAMPLES_EXCLUDE: ${{ matrix.examples-exclude }} - ENV_EXAMPLES_BUILD_PROPERTIES: ${{ toJson(matrix.examples-build-properties) }} + ENV_SKETCHES_EXCLUDE: ${{ matrix.sketches-exclude }} + ENV_BUILD_PROPERTIES: ${{ toJson(matrix.build-properties) }} ENV_SKETCH_NAMES: ${{ matrix.sketch-names }} ENV_SKETCH_NAMES_FILE_START: examples/ # Not really required here, but serves as an usage example. run: | @@ -465,6 +465,10 @@ Samples for using `arduino-test-compile.sh script` instead of `ArminJo/arduino-t # Revision History +### Version v2.6.0 +- Renamed `examples-exclude` to `sketches-exclude`. Old name is still valid. +- Renamed `examples-build-properties` to `build-properties`. Old name is still valid. + ### Version v2.5.0 -> Due to a Github failure/outage on 13.07.2020 the old 2.5.0 version from 10.07.20 (and 2.5.1 from 12.07.20 ) was removed. - Fixed skipped compile of examples, if one *.ino file is present in the repository root. - `examples-build-properties` now used also for **c and S* extra_flags. diff --git a/action.yml b/action.yml index ca9ea8a..158a796 100644 --- a/action.yml +++ b/action.yml @@ -44,17 +44,29 @@ inputs: required: false examples-exclude: + description: 'Deprecated in favor of sketches-exclude. Comma or space separated list of complete names of all sketches / examples to be excluded in the build for this board.' + default: '' + required: false + + sketches-exclude: description: 'Comma or space separated list of complete names of all sketches / examples to be excluded in the build for this board.' default: '' required: false examples-build-properties: description: | - Build parameter like -DDEBUG for each example specified or for all examples, if example name is "All". In json format. + Deprecated in favor of build-properties. Build parameter like -DDEBUG for each example specified or for all examples, if example name is "All". In json format. For example: examples-build-properties: '{ "WhistleSwitch": "-DDEBUG -DFREQUENCY_RANGE_LOW", "SimpleFrequencyDetector": "-DINFO" }' default: '' required: false + build-properties: + description: | + Build parameter like -DDEBUG for each example specified or for all examples, if example name is "All". In json format. + For example: build-properties: '{ "WhistleSwitch": "-DDEBUG -DFREQUENCY_RANGE_LOW", "SimpleFrequencyDetector": "-DINFO" }' + default: '' + required: false + set-build-path: description: 'Flag to set the build directory (arduino-cli paramer --build-path) to /build subdirectory of compiled example.' default: 'false' @@ -82,7 +94,9 @@ runs: - ${{ inputs.platform-default-url }} - ${{ inputs.platform-url }} - ${{ inputs.required-libraries }} + - ${{ inputs.sketches-exclude }} - ${{ inputs.examples-exclude }} + - ${{ inputs.build-properties }} - ${{ inputs.examples-build-properties }} - ${{ inputs.set-build-path }} - ${{ inputs.debug-compile }} diff --git a/arduino-test-compile.sh b/arduino-test-compile.sh index bac29e0..d7ab98d 100755 --- a/arduino-test-compile.sh +++ b/arduino-test-compile.sh @@ -17,11 +17,13 @@ ARDUINO_PLATFORM="$5" PLATFORM_DEFAULT_URL="$6" PLATFORM_URL="$7" REQUIRED_LIBRARIES="$8" -EXAMPLES_EXCLUDE="$9" -EXAMPLES_BUILD_PROPERTIES="${10}" -SET_BUILD_PATH="${11}" -DEBUG_COMPILE="${12}" -DEBUG_INSTALL="${13}" # not yet implemented for action +SKETCHES_EXCLUDE="$9" +EXAMPLES_EXCLUDE="${10}" +BUILD_PROPERTIES="${11}" +EXAMPLES_BUILD_PROPERTIES="${12}" +SET_BUILD_PATH="${13}" +DEBUG_COMPILE="${14}" +DEBUG_INSTALL="${15}" # not yet implemented for action readonly RED='\033[0;31m' readonly GREEN='\033[0;32m' @@ -39,13 +41,20 @@ if [[ -n $ENV_ARDUINO_PLATFORM ]]; then ARDUINO_PLATFORM=$ENV_ARDUINO_PLATFORM; if [[ -n $ENV_PLATFORM_DEFAULT_URL ]]; then PLATFORM_DEFAULT_URL=$ENV_PLATFORM_DEFAULT_URL; fi if [[ -n $ENV_PLATFORM_URL ]]; then PLATFORM_URL=$ENV_PLATFORM_URL; fi if [[ -n $ENV_REQUIRED_LIBRARIES ]]; then REQUIRED_LIBRARIES=$ENV_REQUIRED_LIBRARIES; fi +if [[ -n $ENV_SKETCHES_EXCLUDE ]]; then SKETCHES_EXCLUDE=$ENV_SKETCHES_EXCLUDE; fi if [[ -n $ENV_EXAMPLES_EXCLUDE ]]; then EXAMPLES_EXCLUDE=$ENV_EXAMPLES_EXCLUDE; fi +if [[ -n $ENV_BUILD_PROPERTIES ]]; then BUILD_PROPERTIES=$ENV_BUILD_PROPERTIES; fi if [[ -n $ENV_EXAMPLES_BUILD_PROPERTIES ]]; then EXAMPLES_BUILD_PROPERTIES=$ENV_EXAMPLES_BUILD_PROPERTIES; fi if [[ -n $ENV_SET_BUILD_PATH ]]; then SET_BUILD_PATH=$ENV_SET_BUILD_PATH; fi if [[ -n $ENV_DEBUG_COMPILE ]]; then DEBUG_COMPILE=$ENV_DEBUG_COMPILE; fi if [[ -n $ENV_DEBUG_INSTALL ]]; then DEBUG_INSTALL=$ENV_DEBUG_INSTALL; fi +# +# Handle deprecated names +# +if [[ -z $SKETCHES_EXCLUDE && -n $EXAMPLES_EXCLUDE ]]; then echo "Please change parameter name from \"examples-exclude\" to \"sketches-exclude\""; SKETCHES_EXCLUDE=${EXAMPLES_EXCLUDE}; fi +if [[ -z $BUILD_PROPERTIES && -n $EXAMPLES_BUILD_PROPERTIES ]]; then echo "Please change parameter name from \"examples-build-properties\" to \"build-properties\""; BUILD_PROPERTIES=${EXAMPLES_BUILD_PROPERTIES}; fi # # Enforce defaults. Required at least for script version. !!! MUST be equal the defaults in action.yml !!! @@ -71,8 +80,8 @@ echo ARDUINO_PLATFORM=$ARDUINO_PLATFORM echo PLATFORM_DEFAULT_URL=$PLATFORM_DEFAULT_URL echo PLATFORM_URL=$PLATFORM_URL echo REQUIRED_LIBRARIES=$REQUIRED_LIBRARIES -echo EXAMPLES_EXCLUDE=$EXAMPLES_EXCLUDE -echo EXAMPLES_BUILD_PROPERTIES=$EXAMPLES_BUILD_PROPERTIES +echo SKETCHES_EXCLUDE=$SKETCHES_EXCLUDE +echo BUILD_PROPERTIES=$BUILD_PROPERTIES echo ENV_SET_BUILD_PATH=$SET_BUILD_PATH echo DEBUG_COMPILE=$DEBUG_COMPILE @@ -252,17 +261,17 @@ fi # echo -e "\n"${YELLOW}Compiling sketches / examples for board $ARDUINO_BOARD_FQBN "\n" -# If matrix.examples-build-properties are specified, create an associative shell array +# If matrix.build-properties are specified, create an associative shell array # Input example: { "WhistleSwitch": "-DINFO -DFREQUENCY_RANGE_LOW", "SimpleFrequencyDetector": "-DINFO" } # Converted to: [All]="-DDEBUG -DINFO" [WhistleSwitch]="-DDEBUG -DINFO" -if [[ -n $EXAMPLES_BUILD_PROPERTIES && $EXAMPLES_BUILD_PROPERTIES != "null" ]]; then # contains "null", if passed as environment variable - echo EXAMPLES_BUILD_PROPERTIES=$EXAMPLES_BUILD_PROPERTIES - EXAMPLES_BUILD_PROPERTIES=${EXAMPLES_BUILD_PROPERTIES#\{} # remove the "{". The "}" is required as end token +if [[ -n $BUILD_PROPERTIES && $BUILD_PROPERTIES != "null" ]]; then # contains "null", if passed as environment variable + echo BUILD_PROPERTIES=$BUILD_PROPERTIES + BUILD_PROPERTIES=${BUILD_PROPERTIES#\{} # remove the "{". The "}" is required as end token # (\w*): * first token before the colon and spaces, ([^,}]*) token after colon and spaces up to "," or "}", [,}] trailing characters if [[ $DEBUG_COMPILE == true ]]; then - echo EXAMPLES_BUILD_PROPERTIES is converted to:$(echo $EXAMPLES_BUILD_PROPERTIES | sed -E 's/"(\w*)": *([^,}]*)[,}]/\[\1\]=\2/g') + echo BUILD_PROPERTIES is converted to:$(echo $BUILD_PROPERTIES | sed -E 's/"(\w*)": *([^,}]*)[,}]/\[\1\]=\2/g') fi - declare -A PROP_MAP="( $(echo $EXAMPLES_BUILD_PROPERTIES | sed -E 's/"(\w*)": *([^,}]*)[,}]/\[\1\]=\2/g' ) )" + declare -A PROP_MAP="( $(echo $BUILD_PROPERTIES | sed -E 's/"(\w*)": *([^,}]*)[,}]/\[\1\]=\2/g' ) )" declare -p PROP_MAP # print properties of PROP_MAP else declare -A PROP_MAP=( [dummy]=dummy ) # declare an accociative array @@ -312,7 +321,7 @@ for sketch_name in "${SKETCH_NAMES_ARRAY[@]}"; do # Loop over all sketch names SKETCH_FILENAME=$(basename $sketch) # complete name of sketch SKETCH_EXTENSION=${SKETCH_FILENAME##*.} # extension of sketch SKETCH_BASENAME=${SKETCH_FILENAME%%.*} # name without extension / basename of sketch, must match directory name - if [[ $EXAMPLES_EXCLUDE == *"$SKETCH_BASENAME"* ]]; then + if [[ $SKETCHES_EXCLUDE == *"$SKETCH_BASENAME"* ]]; then echo -e "Skipping $SKETCH_BASENAME \xe2\x9e\x9e" # Right arrow else # If sketch name does not end with .ino, rename it locally