fix: 前置发布构建的 Node 版本门禁
This commit is contained in:
1 parent
ab17f80607
commit
b101d169c9
3 files changed
+25
-2
No files matched your search
@@ -7,6 +7,7 @@ import { spawnSync } from "node:child_process";
|
||||
import { createRequire } from "node:module";
|
||||
import { checkPackage } from "./check-package.mjs";
|
||||
import { verifyRuntimePreflight } from "./runtime-preflight.mjs";
|
||||
import { assertSupportedNode } from "./node-version.mjs";
|
||||
|
||||
const require = createRequire(import.meta.url);
|
||||
const { findLeaks, loadConfig } = require("../../apps/taro/config/mask-taro.cjs");
|
||||
@@ -174,8 +175,6 @@ async function buildTemplateCatalog() {
|
||||
}
|
||||
|
||||
async function main() {
|
||||
if (Number(process.versions.node.split(".")[0]) !== 24)
|
||||
throw new Error("Node.js 24 is required to build the release");
|
||||
if (!/^[a-zA-Z0-9][a-zA-Z0-9._-]{0,100}$/.test(version))
|
||||
throw new Error("Invalid release version");
|
||||
const adminDist = path.join(root, "apps/admin/dist");
|
||||
@@ -260,6 +259,7 @@ async function main() {
|
||||
console.log("checksum: " + path.relative(root, archive + ".sha256"));
|
||||
}
|
||||
|
||||
assertSupportedNode();
|
||||
run("pnpm", ["build:admin:preview"]);
|
||||
assertNoStackFingerprint("apps/admin/dist");
|
||||
run("pnpm", ["--filter", "@personal-brand/config", "build"]);
|
||||
|
||||
Reference in new issue
Block a user