Procházet zdrojové kódy

测试环境-登录页显示

Michael Wang před 5 roky
rodič
revize
b9fd7d194d
1 změnil soubory, kde provedl 9 přidání a 4 odebrání
  1. 9 4
      prebuild.js

+ 9 - 4
prebuild.js

@@ -6,7 +6,7 @@ if (packageJson.dependencies.iview !== "^3.5.2") {
 }
 }
 
 
 console.log("> prebuild");
 console.log("> prebuild");
-console.log("> prebuild create .env.production.local");
+console.log("> prebuild create .env.*.local");
 
 
 const buildDate = require("moment")().format("YYYY-MM-DD HH:mm:SS");
 const buildDate = require("moment")().format("YYYY-MM-DD HH:mm:SS");
 console.log("  构建日期为 " + buildDate);
 console.log("  构建日期为 " + buildDate);
@@ -19,13 +19,18 @@ const revision = require("child_process")
 const fs = require("fs");
 const fs = require("fs");
 console.log("  当前的git版本为 " + revision);
 console.log("  当前的git版本为 " + revision);
 
 
-fs.writeFileSync(
-  ".env.production.local",
-  "VUE_APP_GIT_REPO_VERSION=" + buildDate + " - " + revision
+fs.appendFileSync(
+  ".env.development.local",
+  "VUE_APP_GIT_REPO_VERSION=开发环境-" + buildDate + " - " + revision
 );
 );
 
 
 fs.writeFileSync(
 fs.writeFileSync(
   ".env.staging.local",
   ".env.staging.local",
+  "VUE_APP_GIT_REPO_VERSION=测试环境-" + buildDate + " - " + revision
+);
+
+fs.writeFileSync(
+  ".env.production.local",
   "VUE_APP_GIT_REPO_VERSION=" + buildDate + " - " + revision
   "VUE_APP_GIT_REPO_VERSION=" + buildDate + " - " + revision
 );
 );