diff --git a/compile.sh b/compile.sh index 0566c28..ded162a 100755 --- a/compile.sh +++ b/compile.sh @@ -1,6 +1,12 @@ echo Compiling aquacontrol32 version: $(git describe --tags --always) -echo We are on branch: $(git branch | grep \* | cut -d ' ' -f2) +echo Branch: $(git branch | grep \* | cut -d ' ' -f2) echo -echo "const char * sketchVersion = \"$(git describe --tags --always)\";" > gitTagVersion.h -~/arduino-1.8.9/arduino --board espressif:esp32:mhetesp32minikit --verify test.ino --pref custom_DebugLevel=esp32_none --port /dev/ttyUSB0 --pref upload.speed=921600 --pref build.path=temp --preserve-temp-files +if [ $(git branch | grep \* | cut -d ' ' -f2) == "master" ] +then + echo "const char * sketchVersion = \"$(git describe --tags --always)\";" > gitTagVersion.h +else + echo "const char * sketchVersion = \"$(git describe --tags --always):$(git branch | grep \* | cut -d ' ' -f2)\";" > gitTagVersion.h +fi +echo $(git describe --tags --always):$(git branch | grep \* | cut -d ' ' -f2) +~/arduino-1.8.9/arduino --board espressif:esp32:mhetesp32minikit --verify test.ino --pref custom_DebugLevel=esp32_none --port /dev/ttyUSB0 --pref upload.speed=921600 --pref build.path=temp --preserve-temp-files --pref build.partition=default_ffat rm gitTagVersion.h diff --git a/flash.sh b/flash.sh index 3aff932..1f872fa 100755 --- a/flash.sh +++ b/flash.sh @@ -7,5 +7,6 @@ then else echo "const char * sketchVersion = \"$(git describe --tags --always):$(git branch | grep \* | cut -d ' ' -f2)\";" > gitTagVersion.h fi -~/arduino-1.8.9/arduino --board espressif:esp32:mhetesp32minikit --upload test.ino --pref custom_DebugLevel=esp32_none --port /dev/ttyUSB0 --pref upload.speed=921600 --preserve-temp-files --pref build.path=temp --pref build.flash_freq=80m +echo $(git describe --tags --always):$(git branch | grep \* | cut -d ' ' -f2) +~/arduino-1.8.9/arduino --board espressif:esp32:mhetesp32minikit --upload test.ino --pref custom_DebugLevel=esp32_none --port /dev/ttyUSB0 --pref upload.speed=921600 --preserve-temp-files --pref build.path=temp --pref build.partition=default_ffat --pref build.flash_freq=80m rm gitTagVersion.h