summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYevhen Babiichuk (DustDFG) <dfgdust@gmail.com>2024-10-31 12:54:00 +0200
committerYevhen Babiichuk (DustDFG) <dfgdust@gmail.com>2024-10-31 12:54:23 +0200
commit0ba0093dd6231d9171e147a4f8b05c06ed7262fa (patch)
tree05af6b747f574d10bfc704b2cf57779af5aa73ca
parentef8d981267702de38ffc24136f9d823d31781c60 (diff)
downloadredot-engine-0ba0093dd6231d9171e147a4f8b05c06ed7262fa.tar.gz
Remove duplicate of get_build_version
Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
-rw-r--r--platform/web/emscripten_helpers.py20
1 files changed, 3 insertions, 17 deletions
diff --git a/platform/web/emscripten_helpers.py b/platform/web/emscripten_helpers.py
index 8fcabb21c7..3122271a71 100644
--- a/platform/web/emscripten_helpers.py
+++ b/platform/web/emscripten_helpers.py
@@ -3,6 +3,8 @@ import os
from SCons.Util import WhereIs
+from platform_methods import get_build_version
+
def run_closure_compiler(target, source, env, for_signature):
closure_bin = os.path.join(
@@ -21,22 +23,6 @@ def run_closure_compiler(target, source, env, for_signature):
return " ".join(cmd)
-def get_build_version():
- import version
-
- name = "custom_build"
- if os.getenv("BUILD_NAME") is not None:
- name = os.getenv("BUILD_NAME")
- v = "%d.%d" % (version.major, version.minor)
- if version.patch > 0:
- v += ".%d" % version.patch
- status = version.status
- if os.getenv("GODOT_VERSION_STATUS") is not None:
- status = str(os.getenv("GODOT_VERSION_STATUS"))
- v += ".%s.%s" % (status, name)
- return v
-
-
def create_engine_file(env, target, source, externs, threads_enabled):
if env["use_closure_compiler"]:
return env.BuildJS(target, source, JSEXTERNS=externs)
@@ -84,7 +70,7 @@ def create_template_zip(env, js, wasm, worker, side):
cache.append("godot.editor.worker.js")
opt_cache = ["godot.editor.wasm"]
subst_dict = {
- "___GODOT_VERSION___": get_build_version(),
+ "___GODOT_VERSION___": get_build_version(False),
"___GODOT_NAME___": "GodotEngine",
"___GODOT_CACHE___": json.dumps(cache),
"___GODOT_OPT_CACHE___": json.dumps(opt_cache),