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

View File

@ -22,6 +22,7 @@ const args = (0, util_1.parseArgs)({
alias: "d",
},
},
allowPositionals: true,
});
const distDirName = args.values.distDir || (0, grab_default_dist_name_1.default)();
const DIST_DIR = path_1.default.join(process.cwd(), distDirName);
@ -37,7 +38,7 @@ if (MAX_BUILDS < 1 ||
throw new Error("Invalid MAX_BUILDS");
}
if (!fs_1.default.existsSync(DIST_DIR))
fs_1.default.mkdirSync(DIST_DIR);
fs_1.default.mkdirSync(DIST_DIR, { recursive: true });
if (fs_1.default.existsSync(`${DIST_DIR}/BUILD`)) {
PREV_BUILD_NO = fs_1.default.readFileSync(`${DIST_DIR}/BUILD`, "utf-8");
}

View File

@ -3,10 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const grabDist_1 = __importDefault(require("./functions/grabDist"));
const grabDist_1 = __importDefault(require("../../../rebuilds/next-js/grabDist"));
const distDir = (0, grabDist_1.default)();
const nextConfig = {
/* config options here */
reactStrictMode: true,
distDir,
};

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"name": "@moduletrace/buncid",
"version": "1.0.9",
"version": "1.1.0",
"author": "Benjamin Toby",
"repository": {
"type": "git",

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,