Prevent compiling the whole project on each commit.

Putting the git information into a generated sourcefile prevents
recompiling the whole project after each commit.
This commit is contained in:
Stefan Oberhumer
2024-04-18 09:02:57 +02:00
parent d0981934b0
commit 97800434c4
6 changed files with 72 additions and 14 deletions

View File

@@ -10,6 +10,7 @@
#include "defaults.h"
#include <ESPmDNS.h>
#include <ETH.h>
#include "__compiled_constants.h"
NetworkSettingsClass::NetworkSettingsClass()
: _loopTask(TASK_IMMEDIATE, TASK_FOREVER, std::bind(&NetworkSettingsClass::loop, this))
@@ -136,7 +137,7 @@ void NetworkSettingsClass::handleMDNS()
MDNS.addService("http", "tcp", 80);
MDNS.addService("opendtu", "tcp", 80);
MDNS.addServiceTxt("opendtu", "tcp", "git_hash", AUTO_GIT_HASH);
MDNS.addServiceTxt("opendtu", "tcp", "git_hash", __COMPILED_GIT_HASH__);
MessageOutput.println("done");
} else {