|
@@ -1,4 +1,4 @@
|
|
|
-import { writeFileSync, existsSync } from "fs";
|
|
|
+import { writeFileSync, existsSync, readFileSync } from "fs";
|
|
|
import { execSync } from "child_process";
|
|
|
import moment from "moment";
|
|
|
import packageJson from "./package.json" assert { type: "json" };
|
|
@@ -50,19 +50,21 @@ VITE_GIT_REPO_VERSION=${revision}
|
|
|
);
|
|
|
|
|
|
// 如果不存在则创建,对真正的构建无影响
|
|
|
-if (!existsSync("./src/devLoginParams.ts")) {
|
|
|
+if (
|
|
|
+ !existsSync("./src/devLoginParams.ts") &&
|
|
|
+ !readFileSync("./src/devLoginParams.ts").toString().includes("LOGIN_CONFIG")
|
|
|
+) {
|
|
|
writeFileSync(
|
|
|
"./src/devLoginParams.ts",
|
|
|
`
|
|
|
- export const isAdmin = false;
|
|
|
- export let forceChange = false;
|
|
|
- forceChange = true;
|
|
|
-
|
|
|
- // 很多任务,选分组2
|
|
|
- export const loginName = "";
|
|
|
- export const password = "";
|
|
|
- export const examId = "";
|
|
|
- export const markerId = "";
|
|
|
+ export const LOGIN_CONFIG = {
|
|
|
+ isAdmin: false,
|
|
|
+ forceChange: true,
|
|
|
+ loginName: "1-431-2-1",
|
|
|
+ password: "123456",
|
|
|
+ examId: "1",
|
|
|
+ markerId: "451",
|
|
|
+ };
|
|
|
`
|
|
|
);
|
|
|
}
|