Fix VERSION_FULL_CONFIG ignoring status versioning

(cherry picked from commit cb0d3f7aa0)
This commit is contained in:
Spartan322
2024-10-23 23:23:31 -04:00
parent 7f2bede205
commit ce103fb883
3 changed files with 7 additions and 4 deletions

View File

@@ -125,8 +125,7 @@ Dictionary Engine::get_version_info() const {
dict["hex"] = VERSION_HEX;
dict["status"] = VERSION_STATUS;
dict["build"] = VERSION_BUILD;
dict["status_version"] = dict["status"] != "stable" ? VERSION_STATUS_VERSION : 0;
dict["status_version"] = VERSION_STATUS_VERSION;
String hash = String(VERSION_HASH);
dict["hash"] = hash.is_empty() ? String("unknown") : hash;

View File

@@ -67,7 +67,11 @@
// Describes the full configuration of that Redot version, including the version number,
// the status (beta, stable, etc.) and potential module-specific features (e.g. mono).
// Example: "3.1.4.stable.mono"
#define VERSION_FULL_CONFIG VERSION_NUMBER "." VERSION_STATUS VERSION_MODULE_CONFIG
#if VERSION_STATUS_VERSION == 0
#define VERSION_FULL_CONFIG VERSION_NUMBER "." VERSION_STATUS "." VERSION_MODULE_CONFIG
#else
#define VERSION_FULL_CONFIG VERSION_NUMBER "." VERSION_STATUS "." _MKSTR(VERSION_STATUS_VERSION) VERSION_MODULE_CONFIG
#endif
// Similar to VERSION_FULL_CONFIG, but also includes the (potentially custom) VERSION_BUILD
// description (e.g. official, custom_build, etc.).

View File

@@ -210,7 +210,7 @@ def get_version_info(module_version_string="", silent=False):
"minor": int(version.minor),
"patch": int(version.patch),
"status": str(version.status),
"status_version": int(version.status_version),
"status_version": int(version.status_version if version.status != "stable" else 0),
"build": str(build_name),
"module_config": str(version.module_config) + module_version_string,
"website": str(version.website),