summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-07-11 16:37:25 +0200
committerGitHub <noreply@github.com>2017-07-11 16:37:25 +0200
commit3741a576575f3fef4f7c743e90856240d9f47ffc (patch)
tree11a073ad528de287aa70859b8dd6cc34f9181bd2 /core
parent98a9c8fc5f6590e8233e766ec05dab527d5343ac (diff)
parent5a9eb5ef58288506256998bcbc9c1fc20d4f50d1 (diff)
Merge pull request #9589 from Noshyaar/ref
Include Git hash in the engine
Diffstat (limited to 'core')
-rw-r--r--core/engine.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/engine.cpp b/core/engine.cpp
index 5301c4e519..42850325b4 100644
--- a/core/engine.cpp
+++ b/core/engine.cpp
@@ -30,6 +30,7 @@
#include "engine.h"
#include "version.h"
+#include "version_hash.gen.h"
void Engine::set_iterations_per_second(int p_ips) {
@@ -87,6 +88,9 @@ Dictionary Engine::get_version_info() const {
dict["revision"] = _MKSTR(VERSION_REVISION);
dict["year"] = VERSION_YEAR;
+ String hash = String(VERSION_HASH);
+ dict["hash"] = hash.length() == 0 ? String("unknown") : hash;
+
String stringver = String(dict["major"]) + "." + String(dict["minor"]);
if ((int)dict["patch"] != 0)
stringver += "." + String(dict["patch"]);