From 6871842220f4c16dad7c549a3c65979606726909 Mon Sep 17 00:00:00 2001 From: Marcus Date: Sat, 15 Jun 2024 15:24:42 +0200 Subject: [PATCH] tune cangrow.sh --- Arduino/CanGrow/CanGrow_Version.h | 2 +- cangrow.sh | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Arduino/CanGrow/CanGrow_Version.h b/Arduino/CanGrow/CanGrow_Version.h index bebc6f9..cf0be1e 100644 --- a/Arduino/CanGrow/CanGrow_Version.h +++ b/Arduino/CanGrow/CanGrow_Version.h @@ -1,5 +1,5 @@ /* CanGrow_Version.h gets generated from cangrow.sh */ const char* CanGrowVer = "0.1-dev"; -const char* CanGrowBuild = "1e9ab6e"; +const char* CanGrowBuild = "fc00f92"; diff --git a/cangrow.sh b/cangrow.sh index f529f60..8549068 100755 --- a/cangrow.sh +++ b/cangrow.sh @@ -4,6 +4,7 @@ test -z $TTY && TTY="/dev/ttyUSB0" test -z $IP && IP="192.168.30.212" test -z $VER && VER="0.1-dev" +BUILD="$(git rev-parse --short HEAD)" function help() { echo "$0 [build|upload|webupload|monitor]" @@ -14,14 +15,15 @@ test -z $1 && help case $1 in b|build) - echo "building firmware binary into $(pwd)/build/" + echo "building firmware $VER $BUILD, target dir: $(pwd)/build/" test -d build || mkdir build echo "/* CanGrow_Version.h gets generated from cangrow.sh */ const char* CanGrowVer = \"${VER}\"; -const char* CanGrowBuild = \"$(git rev-parse --short HEAD)\"; +const char* CanGrowBuild = \"${BUILD}\"; " > Arduino/CanGrow/CanGrow_Version.h ~/.local/bin/arduino-cli --no-color compile -b esp8266:esp8266:d1_mini_clone "Arduino/CanGrow/CanGrow.ino" --output-dir build/ || exit 1 + cp build/CanGrow.ino.bin build/CanGrow_v${VER}_${BUILD}.bin ;; u|upload) echo "uploading to $TTY"