This commit is contained in:
Benjamin Toby
2025-02-21 09:17:55 +01:00
parent 4540404522
commit 85a64f85d6
5 changed files with 8 additions and 6 deletions
+3 -1
View File
@@ -22,6 +22,7 @@ const args = parseArgs({
alias: "d",
},
},
allowPositionals: true,
});
const distDirName = args.values.distDir || grabDefaultDistName();
@@ -42,7 +43,7 @@ if (
throw new Error("Invalid MAX_BUILDS");
}
if (!fs.existsSync(DIST_DIR)) fs.mkdirSync(DIST_DIR);
if (!fs.existsSync(DIST_DIR)) fs.mkdirSync(DIST_DIR, { recursive: true });
if (fs.existsSync(`${DIST_DIR}/BUILD`)) {
PREV_BUILD_NO = fs.readFileSync(`${DIST_DIR}/BUILD`, "utf-8");
@@ -131,6 +132,7 @@ function revert(dir: string) {
: build.stderr
? build.stderr.toString()
: "NO BUILD_ID found in New Build Folder";
fs.writeFileSync(
`${DIST_DIR}/LAST_BUILD_FAIL`,
Date() + "\n\n" + writeErr,