From 5a9eb5ef58288506256998bcbc9c1fc20d4f50d1 Mon Sep 17 00:00:00 2001 From: Poommetee Ketson Date: Mon, 10 Jul 2017 15:47:38 +0700 Subject: Include Git hash in the engine --- core/engine.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core') 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"]); -- cgit v1.2.3