diff --git a/compile.sh b/compile.sh index 6405b2f..4a579b4 100755 --- a/compile.sh +++ b/compile.sh @@ -12,5 +12,5 @@ else fi echo "const char * sketchVersion = \"$currentVersion\";" > gitTagVersion.h echo -e Compiling aquacontrol32 version: '\e[36m'$currentVersion'\e[0m' -~/arduino-1.8.9/arduino --board espressif:esp32:mhetesp32minikit --pref custom_DebugLevel=esp32_none --port /dev/ttyUSB0 --pref upload.speed=921600 --preserve-temp-files --pref build.path=temp --pref build.partitions=default_ffat --pref build.flash_freq=80m -v --verify aquacontrol32.ino | grep -e 'Using core' -e 'Using board' -e ' uses ' -e 'Using library' -e 'Compiling' -e 'Global' +~/arduino-1.8.10/arduino --board espressif:esp32:mhetesp32minikit --pref custom_DebugLevel=esp32_none --port /dev/ttyUSB0 --pref upload.speed=921600 --preserve-temp-files --pref build.path=temp --pref build.partitions=default_ffat --pref build.flash_freq=80m -v --verify aquacontrol32.ino | grep -e 'Using core' -e 'Using board' -e ' uses ' -e 'Using library' -e 'Compiling' -e 'Global' rm gitTagVersion.h diff --git a/debug.sh b/debug.sh new file mode 100755 index 0000000..537461e --- /dev/null +++ b/debug.sh @@ -0,0 +1,16 @@ +if [ $(grep GIT_TAG deviceSetup.h | grep -ic TRUE) != "1" ] +then + echo -e '\e[31m'ERROR'\e[0m' GIT_TAG not set to true in deviceSetup.h. + exit 1 +fi +currentVersion="" +if [ $(git branch | grep \* | cut -d ' ' -f2) == "master" ] +then + currentVersion=$(git describe --tags --always) +else + currentVersion=$(git branch | grep \* | cut -d ' ' -f2):$(git rev-parse --short HEAD) +fi +echo "const char * sketchVersion = \"$currentVersion\";" > gitTagVersion.h +echo -e Compiling and flashing aquacontrol32 version: '\e[36m'$currentVersion'\e[0m' +~/arduino-1.8.10/arduino --board espressif:esp32:esp32 --pref custom_DebugLevel=esp32_info --port /dev/ttyUSB0 --pref upload.speed=921600 --preserve-temp-files --pref build.path=temp --pref build.partitions=default_ffat --pref build.flash_freq=80m -v --upload aquacontrol32.ino | grep -e 'Using core' -e 'Using board' -e ' uses ' -e 'Using library' -e 'Compiling' -e 'Global' +rm gitTagVersion.h diff --git a/flash.sh b/flash.sh index c8479ad..e90f3a5 100755 --- a/flash.sh +++ b/flash.sh @@ -12,5 +12,5 @@ else fi echo "const char * sketchVersion = \"$currentVersion\";" > gitTagVersion.h echo -e Compiling and flashing aquacontrol32 version: '\e[36m'$currentVersion'\e[0m' -~/arduino-1.8.9/arduino --board espressif:esp32:mhetesp32minikit --pref custom_DebugLevel=esp32_none --port /dev/ttyUSB0 --pref upload.speed=921600 --preserve-temp-files --pref build.path=temp --pref build.partitions=default_ffat --pref build.flash_freq=80m -v --upload aquacontrol32.ino | grep -e 'Using core' -e 'Using board' -e ' uses ' -e 'Using library' -e 'Compiling' -e 'Global' +~/arduino-1.8.10/arduino --board espressif:esp32:mhetesp32minikit --pref custom_DebugLevel=esp32_none --port /dev/ttyUSB0 --pref upload.speed=921600 --preserve-temp-files --pref build.path=temp --pref build.partitions=default_ffat --pref build.flash_freq=80m -v --upload aquacontrol32.ino | grep -e 'Using core' -e 'Using board' -e ' uses ' -e 'Using library' -e 'Compiling' -e 'Global' rm gitTagVersion.h