Skip to content

Commit 6ca3627

Browse files
committed
Merge pull request godotengine#98697 from dustdfg/deduplicate_get_build_version
Remove duplicate of `get_build_version`
2 parents 194ddfd + 0ba0093 commit 6ca3627

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

platform/web/emscripten_helpers.py

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
from SCons.Util import WhereIs
55

6+
from platform_methods import get_build_version
7+
68

79
def run_closure_compiler(target, source, env, for_signature):
810
closure_bin = os.path.join(
@@ -21,22 +23,6 @@ def run_closure_compiler(target, source, env, for_signature):
2123
return " ".join(cmd)
2224

2325

24-
def get_build_version():
25-
import version
26-
27-
name = "custom_build"
28-
if os.getenv("BUILD_NAME") is not None:
29-
name = os.getenv("BUILD_NAME")
30-
v = "%d.%d" % (version.major, version.minor)
31-
if version.patch > 0:
32-
v += ".%d" % version.patch
33-
status = version.status
34-
if os.getenv("GODOT_VERSION_STATUS") is not None:
35-
status = str(os.getenv("GODOT_VERSION_STATUS"))
36-
v += ".%s.%s" % (status, name)
37-
return v
38-
39-
4026
def create_engine_file(env, target, source, externs, threads_enabled):
4127
if env["use_closure_compiler"]:
4228
return env.BuildJS(target, source, JSEXTERNS=externs)
@@ -84,7 +70,7 @@ def create_template_zip(env, js, wasm, worker, side):
8470
cache.append("godot.editor.worker.js")
8571
opt_cache = ["godot.editor.wasm"]
8672
subst_dict = {
87-
"___GODOT_VERSION___": get_build_version(),
73+
"___GODOT_VERSION___": get_build_version(False),
8874
"___GODOT_NAME___": "GodotEngine",
8975
"___GODOT_CACHE___": json.dumps(cache),
9076
"___GODOT_OPT_CACHE___": json.dumps(opt_cache),

0 commit comments

Comments
 (0)