|
@@ -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
|
|
|
);
|
|
|
|