33
44from SCons .Util import WhereIs
55
6+ from platform_methods import get_build_version
7+
68
79def 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-
4026def 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