summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGeorge L. Albany <Megacake1234@gmail.com>2024-10-15 02:55:15 +0000
committerGitHub <noreply@github.com>2024-10-15 02:55:15 +0000
commit7894cd1a5a680020c51e0df96ce8675ad647d91b (patch)
tree88ff6a028adc1ee4083a92222581f7513fbf81d5 /core
parent26153b5146723a7af83f5ac096fd1a57bede6209 (diff)
parent361170f6dad7e1bb873f72b17def01980162fc11 (diff)
downloadredot-engine-7894cd1a5a680020c51e0df96ce8675ad647d91b.tar.gz
Merge pull request #682 from Spartan322/redot-add/status-version
Add status_version to versioning
Diffstat (limited to 'core')
-rw-r--r--core/SCsub1
-rw-r--r--core/config/engine.cpp10
2 files changed, 10 insertions, 1 deletions
diff --git a/core/SCsub b/core/SCsub
index 3570f0dc15..1c01bbbef6 100644
--- a/core/SCsub
+++ b/core/SCsub
@@ -186,6 +186,7 @@ def version_info_builder(target, source, env):
#define VERSION_MINOR {minor}
#define VERSION_PATCH {patch}
#define VERSION_STATUS "{status}"
+#define VERSION_STATUS_VERSION {status_version}
#define VERSION_BUILD "{build}"
#define VERSION_MODULE_CONFIG "{module_config}"
#define VERSION_WEBSITE "{website}"
diff --git a/core/config/engine.cpp b/core/config/engine.cpp
index c0d7389715..0ad659629a 100644
--- a/core/config/engine.cpp
+++ b/core/config/engine.cpp
@@ -126,6 +126,8 @@ Dictionary Engine::get_version_info() const {
dict["status"] = VERSION_STATUS;
dict["build"] = VERSION_BUILD;
+ dict["status_version"] = dict["status"] != "stable" ? VERSION_STATUS_VERSION : 0;
+
String hash = String(VERSION_HASH);
dict["hash"] = hash.is_empty() ? String("unknown") : hash;
@@ -135,7 +137,13 @@ Dictionary Engine::get_version_info() const {
if ((int)dict["patch"] != 0) {
stringver += "." + String(dict["patch"]);
}
- stringver += "-" + String(dict["status"]) + " (" + String(dict["build"]) + ")";
+ stringver += "-" + String(dict["status"]);
+
+ if ((int)dict["status_version"] != 0) {
+ stringver += "." + String(dict["status_version"]);
+ }
+
+ stringver += " (" + String(dict["build"]) + ")";
dict["string"] = stringver;
return dict;