Fix defines CANGROW_VER and CANGROW_BUILD
esp32 and esp8266 need different places where to put them.
This commit is contained in:
parent
16074669c3
commit
42d5939dbc
1 changed files with 22 additions and 2 deletions
|
@ -101,14 +101,34 @@ case $1 in
|
||||||
echo ":: Building firmware $VER $BUILD, target dir: $(pwd)/build/"
|
echo ":: Building firmware $VER $BUILD, target dir: $(pwd)/build/"
|
||||||
#version_header
|
#version_header
|
||||||
test -d build || mkdir build
|
test -d build || mkdir build
|
||||||
${ACLI_CMD} --no-color compile -b ${BOARD} --build-property "build.extra_flags=-DCANGROW_VER=\"${VER}\" -DCANGROW_BUILD=\"${BUILD}\"" "CanGrow.ino" --output-dir build/ || exit 1
|
|
||||||
|
|
||||||
|
# esp8266 and esp32 compiler have to use different compile flags for VER and BUILD
|
||||||
|
if [ "$(echo $BOARD | cut -d : -f1)" == "esp8266" ]
|
||||||
|
then
|
||||||
|
${ACLI_CMD} --no-color compile -b ${BOARD} --build-property "build.extra_flags=-DCANGROW_VER=\"${VER}\" -DCANGROW_BUILD=\"${BUILD}\"" "CanGrow.ino" --output-dir build/ || exit 1
|
||||||
|
elif [ "$(echo $BOARD | cut -d : -f1)" == "esp32" ]
|
||||||
|
then
|
||||||
|
${ACLI_CMD} --no-color compile -b ${BOARD} --build-property "build.defines=-DCANGROW_VER=\"${VER}\" -DCANGROW_BUILD=\"${BUILD}\"" "CanGrow.ino" --output-dir build/ || exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
cp build/CanGrow.ino.bin build/CanGrow_v${VER}_${BUILD}.bin
|
cp build/CanGrow.ino.bin build/CanGrow_v${VER}_${BUILD}.bin
|
||||||
;;
|
;;
|
||||||
u|upload)
|
u|upload)
|
||||||
check_acli
|
check_acli
|
||||||
echo ":: Build and upload firmware $VER $BUILD to $TTY"
|
echo ":: Build and upload firmware $VER $BUILD to $TTY"
|
||||||
#version_header
|
#version_header
|
||||||
${ACLI_CMD} --no-color compile -b ${BOARD} --build-property "build.extra_flags=-DCANGROW_VER=\"${VER}\" -DCANGROW_BUILD=\"${BUILD}\"" ${ACLI_BUILD_OPTS} -u -p $TTY "CanGrow.ino"
|
test -d build || mkdir build
|
||||||
|
|
||||||
|
# esp8266 and esp32 compiler have to use different compile flags for VER and BUILD
|
||||||
|
if [ "$(echo $BOARD | cut -d : -f1)" == "esp8266" ]
|
||||||
|
then
|
||||||
|
${ACLI_CMD} --no-color compile -b ${BOARD} --build-property "build.extra_flags=-DCANGROW_VER=\"${VER}\" -DCANGROW_BUILD=\"${BUILD}\"" ${ACLI_BUILD_OPTS} -u -p $TTY "CanGrow.ino"
|
||||||
|
elif [ "$(echo $BOARD | cut -d : -f1)" == "esp32" ]
|
||||||
|
then
|
||||||
|
${ACLI_CMD} --no-color compile -b ${BOARD} --build-property "build.defines=-DCANGROW_VER=\"${VER}\" -DCANGROW_BUILD=\"${BUILD}\"" ${ACLI_BUILD_OPTS} -u -p $TTY "CanGrow.ino"
|
||||||
|
fi
|
||||||
|
|
||||||
;;
|
;;
|
||||||
w|webupload)
|
w|webupload)
|
||||||
echo ":: Uploading to $IP"
|
echo ":: Uploading to $IP"
|
||||||
|
|
Loading…
Reference in a new issue