Pārlūkot izejas kodu

测试环境-登录页显示

Michael Wang 5 gadi atpakaļ
vecāks
revīzija
b9fd7d194d
1 mainītis faili ar 9 papildinājumiem un 4 dzēšanām
  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 create .env.production.local");
+console.log("> prebuild create .env.*.local");
 
 const buildDate = require("moment")().format("YYYY-MM-DD HH:mm:SS");
 console.log("  构建日期为 " + buildDate);
@@ -19,13 +19,18 @@ const revision = require("child_process")
 const fs = require("fs");
 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(
   ".env.staging.local",
+  "VUE_APP_GIT_REPO_VERSION=测试环境-" + buildDate + " - " + revision
+);
+
+fs.writeFileSync(
+  ".env.production.local",
   "VUE_APP_GIT_REPO_VERSION=" + buildDate + " - " + revision
 );