diff --git a/.drone.yml b/.drone.yml index 93b6c47..c6c7109 100644 --- a/.drone.yml +++ b/.drone.yml @@ -24,6 +24,13 @@ steps: base_url: https://code.jcktrue.dk files: - .pio/build/nodemcu/firmware.bin + checksum: + - md5 + - sha1 + - sha256 + - sha512 + - adler32 + - crc32 when: event: tag branch: diff --git a/include/config.h b/include/config.h index dde0dac..c2f0114 100644 --- a/include/config.h +++ b/include/config.h @@ -1,8 +1,9 @@ #ifndef CONFIG_H #define CONFIG_H -#ifndef CONFIG_VERSION -#define CONFIG_VERSION "v0.4.4-Dev" +#ifndef VERSION +//SEMVER style version +#define VERSION "0.4.5-Dev" #endif #define CONFIG_SERIAL_BAUDRATE 115200 diff --git a/platformio.ini b/platformio.ini index ab2b817..d61d1c9 100644 --- a/platformio.ini +++ b/platformio.ini @@ -4,7 +4,7 @@ framework = arduino upload_speed=921600 -build_flags = -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY -DCONFIG_VERSION=${sysenv.DRONE_TAG} +build_flags = -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY -DVERSION=${sysenv.DRONE_SEMVER} lib_deps = https://github.com/homieiot/homie-esp8266.git#develop-v3, DHT sensor library for ESPx [env:nodemcu] diff --git a/src/main.cpp b/src/main.cpp index b48bb9a..e792758 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -20,7 +20,7 @@ bool powerStateHandler(const HomieRange& range, const String& value) powerNode.setProperty("state").send(value); powerNode.setProperty("timer").send("0"); timer = 0; - + if(value == "on") { OUTPUT_SET(true); @@ -109,7 +109,7 @@ void setup() { Serial.begin(CONFIG_SERIAL_BAUDRATE); - Homie_setFirmware("deskcontrol", CONFIG_VERSION); + Homie_setFirmware("deskcontrol", VERSION); Homie.disableResetTrigger();