fix: harden release gate and page delivery
Memind CI / Test, build, and release guards (push) Failing after 12m3s
Memind CI / Test, build, and release guards (push) Failing after 12m3s
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env node
|
||||
import path from 'node:path';
|
||||
|
||||
import { assertPortalRuntimePath } from '../release-gate/artifact.mjs';
|
||||
import { inspectRuntimePublicUrls } from '../release-gate/public-url.mjs';
|
||||
|
||||
const ROOT = path.resolve(new URL('..', import.meta.url).pathname);
|
||||
const artifactArg = process.argv[2] ?? path.join(ROOT, '.runtime', 'portal');
|
||||
const runtimeRoot = assertPortalRuntimePath(path.resolve(artifactArg), { repoRoot: ROOT });
|
||||
const findings = await inspectRuntimePublicUrls(runtimeRoot);
|
||||
|
||||
if (findings.length > 0) {
|
||||
for (const finding of findings) {
|
||||
console.error(`FAIL REL-05 ${finding.file}: ${finding.reason}${finding.url ? ` (${finding.url})` : ''}`);
|
||||
}
|
||||
process.exitCode = 1;
|
||||
} else {
|
||||
console.log('PASS REL-05 public documents contain no loopback/private/unknown TKMind URLs');
|
||||
console.log('PASS REL-05 production entry defaults to https://m.tkmind.cn');
|
||||
}
|
||||
Reference in New Issue
Block a user