Browse Source

[HTML5] Fix editor version numbering.

Should not write patch version when it's `0`.
Fabio Alessandrelli 4 years ago
parent
commit
60f2166c27
1 changed files with 5 additions and 1 deletions
  1. 5 1
      platform/javascript/emscripten_helpers.py

+ 5 - 1
platform/javascript/emscripten_helpers.py

@@ -21,7 +21,11 @@ def get_build_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)
+    v = "%d.%d" % (version.major, version.minor)
+    if version.patch > 0:
+        v += ".%d" % version.patch
+    v += ".%s.%s" % (version.status, name)
+    return v
 
 
 def create_engine_file(env, target, source, externs):