summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSpartan322 <Megacake1234@gmail.com>2024-10-17 20:44:00 -0400
committerSpartan322 <Megacake1234@gmail.com>2024-10-17 20:44:00 -0400
commit834a843c46587d8bdd6d9e3f02fe84dfccce25cb (patch)
tree219866bdf11bd4b1eef031774a85bcfde3b55a1e
parent05896a777dd6c86955afb516884f7f9d1a38ff6a (diff)
downloadredot-engine-834a843c46587d8bdd6d9e3f02fe84dfccce25cb.tar.gz
Bump version to 4.3-beta.1
Add status_version to version.py Update Engine.xml example for get_godot_compatible_version_info
-rw-r--r--core/SCsub1
-rw-r--r--core/config/engine.cpp10
-rw-r--r--doc/classes/Engine.xml11
-rw-r--r--methods.py1
-rw-r--r--version.py5
5 files changed, 20 insertions, 8 deletions
diff --git a/core/SCsub b/core/SCsub
index bd61b5fc5b..eb049bd179 100644
--- a/core/SCsub
+++ b/core/SCsub
@@ -185,6 +185,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 16d29915b9..af8c3729be 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;
diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml
index bb5f607422..c57057ef3d 100644
--- a/doc/classes/Engine.xml
+++ b/doc/classes/Engine.xml
@@ -91,15 +91,15 @@
[b]Note:[/b] The [code]hex[/code] value is still an [int] internally, and printing it will give you its decimal representation, which is not particularly meaningful. Use hexadecimal literals for quick version comparisons from code:
[codeblocks]
[gdscript]
- if Engine.get_version_info().hex &gt;= 0x040100:
- pass # Do things specific to version 4.1 or later.
+ if Engine.get_godot_compatible_version_info().hex &gt;= 0x040100:
+ pass # Do things specifically based on Godot version 4.1 compatibility or later.
else:
pass # Do things specific to versions before 4.1.
[/gdscript]
[csharp]
- if ((int)Engine.GetVersionInfo()["hex"] &gt;= 0x040100)
+ if ((int)Engine.GetGodotCompatibleVersionInfo()["hex"] &gt;= 0x040100)
{
- // Do things specific to version 4.1 or later.
+ // Do things specifically based on Godot version 4.1 compatibility or later.
}
else
{
@@ -228,7 +228,8 @@
- [code]minor[/code] - Minor version number as an int;
- [code]patch[/code] - Patch version number as an int;
- [code]hex[/code] - Full version encoded as a hexadecimal int with one byte (2 hex digits) per number (see example below);
- - [code]status[/code] - Status (such as "beta", "rc1", "rc2", "stable", etc.) as a String;
+ - [code]status[/code] - Status (such as "beta", "rc", "stable", etc.) as a String;
+ - [code]status_version[/code] - Status version number as an int, [code]0[/code] if status is [code]"stable"[/code];
- [code]build[/code] - Build name (e.g. "custom_build") as a String;
- [code]hash[/code] - Full Git commit hash as a String;
- [code]timestamp[/code] - Holds the Git commit date UNIX timestamp in seconds as an int, or [code]0[/code] if unavailable;
diff --git a/methods.py b/methods.py
index 798548d91f..45e8549886 100644
--- a/methods.py
+++ b/methods.py
@@ -210,6 +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),
"build": str(build_name),
"module_config": str(version.module_config) + module_version_string,
"website": str(version.website),
diff --git a/version.py b/version.py
index 7432bade76..38dd561125 100644
--- a/version.py
+++ b/version.py
@@ -2,8 +2,9 @@ short_name = "redot"
name = "Redot Engine"
major = 4
minor = 3
-patch = 1
-status = "rc"
+patch = 0
+status = "beta"
+status_version = 1
module_config = ""
website = "https://redotengine.org"
docs = "4.3"