summaryrefslogtreecommitdiff
path: root/platform/javascript/emscripten_helpers.py
diff options
context:
space:
mode:
Diffstat (limited to 'platform/javascript/emscripten_helpers.py')
-rw-r--r--platform/javascript/emscripten_helpers.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/platform/javascript/emscripten_helpers.py b/platform/javascript/emscripten_helpers.py
index 278186e4c0..d08555916b 100644
--- a/platform/javascript/emscripten_helpers.py
+++ b/platform/javascript/emscripten_helpers.py
@@ -15,6 +15,15 @@ def run_closure_compiler(target, source, env, for_signature):
return " ".join(cmd)
+def get_build_version(env):
+ import version
+
+ name = "custom_build"
+ if os.getenv("BUILD_NAME") != None:
+ name = os.getenv("BUILD_NAME")
+ return "%d.%d.%d.%s.%s" % (version.major, version.minor, version.patch, version.status, name)
+
+
def create_engine_file(env, target, source, externs):
if env["use_closure_compiler"]:
return env.BuildJS(target, source, JSEXTERNS=externs)
@@ -22,18 +31,12 @@ def create_engine_file(env, target, source, externs):
def add_js_libraries(env, libraries):
- if "JS_LIBS" not in env:
- env["JS_LIBS"] = []
env.Append(JS_LIBS=env.File(libraries))
def add_js_pre(env, js_pre):
- if "JS_PRE" not in env:
- env["JS_PRE"] = []
env.Append(JS_PRE=env.File(js_pre))
def add_js_externs(env, externs):
- if "JS_EXTERNS" not in env:
- env["JS_EXTERNS"] = []
env.Append(JS_EXTERNS=env.File(externs))