浏览代码

Fix Build

sebavan 6 年之前
父节点
当前提交
c2629c4aa9
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Tools/Publisher/tasks/versionNumberManager.js

+ 2 - 2
Tools/Publisher/tasks/versionNumberManager.js

@@ -11,10 +11,10 @@ const enginePath = path.join(config.core.computed.mainDirectory, "Engines/engine
  * Get the version from the engine class for Babylon
  * Get the version from the engine class for Babylon
  */
  */
 function getEngineVersion() {
 function getEngineVersion() {
-    colorConsole.log("Get version from engine.ts");
+    colorConsole.log("Get version from engine.ts", enginePath);
     const engineContent = fs.readFileSync(enginePath).toString();
     const engineContent = fs.readFileSync(enginePath).toString();
 
 
-    const versionRegex = new RegExp(`public static get Version\\(\\): string {[\\s\\S]*return "([\\s\\S]*?)";[\\s\\S]*}`, "gm");
+    const versionRegex = new RegExp(`public static get Version\\(\\): string {\\s*return "(\\S*)";\\s*}`, "gm");
     const match = versionRegex.exec(engineContent);
     const match = versionRegex.exec(engineContent);
     if (match && match.length) {
     if (match && match.length) {
         const version = match[1];
         const version = match[1];