Explorar el Código

compare only the first 7 characters of the hashes (#1472)

Co-authored-by: CaCO3 <caco@ruinelli.ch>
CaCO3 hace 3 años
padre
commit
ad137b329b
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      code/main/main.cpp

+ 1 - 1
code/main/main.cpp

@@ -223,7 +223,7 @@ extern "C" void app_main(void)
     LogFile.WriteToFile(ESP_LOG_INFO, TAG, "================== Main Started =================");
     LogFile.WriteToFile(ESP_LOG_INFO, TAG, "================== Main Started =================");
     LogFile.WriteToFile(ESP_LOG_INFO, TAG, "=================================================");
     LogFile.WriteToFile(ESP_LOG_INFO, TAG, "=================================================");
 
 
-    if (getHTMLcommit() != std::string(GIT_REV)) {
+    if (getHTMLcommit().substr(0, 7) != std::string(GIT_REV).substr(0, 7)) { // Compare the first 7 characters of both hashes
         LogFile.WriteToFile(ESP_LOG_WARN, TAG, std::string("Web UI version (") + getHTMLcommit() + ") does not match firmware version (" + std::string(GIT_REV) + ") !");
         LogFile.WriteToFile(ESP_LOG_WARN, TAG, std::string("Web UI version (") + getHTMLcommit() + ") does not match firmware version (" + std::string(GIT_REV) + ") !");
     }
     }