File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -47,8 +47,8 @@ build_firmware() {
4747 # e.g: RAK_4631_Repeater-v1.0.0-SHA
4848 FIRMWARE_FILENAME=" $1 -${FIRMWARE_VERSION_STRING} "
4949
50- # export build flags for pio so we can inject firmware version info
51- export PLATFORMIO_BUILD_FLAGS=" -DFIRMWARE_BUILD_DATE='\" ${FIRMWARE_BUILD_DATE} \" ' -DFIRMWARE_VERSION='\" ${FIRMWARE_VERSION_STRING} \" '"
50+ # add firmware version info to end of existing platformio build flags in environment vars
51+ export PLATFORMIO_BUILD_FLAGS=" ${PLATFORMIO_BUILD_FLAGS} -DFIRMWARE_BUILD_DATE='\" ${FIRMWARE_BUILD_DATE} \" ' -DFIRMWARE_VERSION='\" ${FIRMWARE_VERSION_STRING} \" '"
5252
5353 # build firmware target
5454 pio run -e $1
@@ -143,8 +143,11 @@ mkdir -p out
143143
144144# handle script args
145145if [[ $1 == " build-firmware" ]]; then
146- if [ " $2 " ]; then
147- build_firmware $2
146+ TARGETS=${@: 2}
147+ if [ " $TARGETS " ]; then
148+ for env in $TARGETS ; do
149+ build_firmware $env
150+ done
148151 else
149152 echo " usage: $0 build-firmware <target>"
150153 exit 1
You can’t perform that action at this time.
0 commit comments