diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/config/engine.cpp | 2 | ||||
-rw-r--r-- | core/version.h | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/core/config/engine.cpp b/core/config/engine.cpp index 2bb8837849..d714ec42c2 100644 --- a/core/config/engine.cpp +++ b/core/config/engine.cpp @@ -114,6 +114,8 @@ Dictionary Engine::get_version_info() const { String hash = String(VERSION_HASH); dict["hash"] = hash.is_empty() ? String("unknown") : hash; + dict["timestamp"] = VERSION_TIMESTAMP; + String stringver = String(dict["major"]) + "." + String(dict["minor"]); if ((int)dict["patch"] != 0) { stringver += "." + String(dict["patch"]); diff --git a/core/version.h b/core/version.h index abb81312ac..18a97cadf0 100644 --- a/core/version.h +++ b/core/version.h @@ -33,6 +33,8 @@ #include "core/version_generated.gen.h" +#include <stdint.h> + // Copied from typedefs.h to stay lean. #ifndef _STR #define _STR(m_x) #m_x @@ -77,4 +79,8 @@ // Git commit hash, generated at build time in `core/version_hash.gen.cpp`. extern const char *const VERSION_HASH; +// Git commit date UNIX timestamp (in seconds), generated at build time in `core/version_hash.gen.cpp`. +// Set to 0 if unknown. +extern const uint64_t VERSION_TIMESTAMP; + #endif // VERSION_H |