fix(ai): validate generated model data before builds

This commit is contained in:
Armin Ronacher
2026-07-20 22:28:48 +02:00
parent ff992261e2
commit c8c3cd499f
14 changed files with 700 additions and 103 deletions
+4 -4
View File
@@ -209,9 +209,9 @@ const bunInstallDirectory = join(outDir, "bun-install");
const binaryDirectory = join(outDir, "bun");
mkdirSync(tarballDirectory, { recursive: true });
if (!options.skipCheck || !options.skipTest) {
run("npm", ["--prefix", "packages/ai", "run", "generate-models"], { cwd: repoRoot });
}
// Release artifacts always use a freshly generated, strictly validated catalog,
// including when checks or tests are explicitly skipped.
run("npm", ["run", "generate:models"], { cwd: repoRoot });
if (!options.skipCheck) {
run("npm", ["run", "check"], { cwd: repoRoot });
@@ -223,7 +223,7 @@ if (!options.skipTest) {
for (const pkg of packages) {
run("npm", ["run", "clean"], { cwd: pkg.directory });
run("npm", ["run", "build"], { cwd: pkg.directory });
run("npm", ["run", pkg.directory === "packages/ai" ? "build:offline" : "build"], { cwd: pkg.directory });
}
const tarballs = new Map();