storebound/tools/ci.ts
CRT 1d7b178119 Adapters for every AI tool from one source, tests and CI
- tools/gen-adapters.ts writes the Claude Code plugin + .mcp.json, Codex plugin, Gemini CLI
  extension + GEMINI.md, AGENTS.md, Copilot instructions and a Cursor rule from skills/ and
  docs/agents-core.md; --check fails on stale files
- tests for adapters, MCP tools and JSON-RPC, validate rules, ASO, release notes, privacy
  manifest, release helpers, install merging, scrub
- bun run ci: adapters check, tests, typecheck, secrets / personal data scrub
- 0.2.0
2026-10-10 13:03:10 +00:00

17 lines
771 B
TypeScript

#!/usr/bin/env bun
// Everything CI runs, in order; stops at the first failure. bun run ci
const steps: [string, string[]][] = [
['adapters', ['bun', 'tools/gen-adapters.ts', '--check']],
['tests', ['bun', 'test']],
['typecheck', ['bunx', 'tsc', '--noEmit']],
['scrub', ['bun', 'tools/scrub.ts']],
];
const root = new URL('..', import.meta.url).pathname;
for (const [name, cmd] of steps) {
const t = Date.now();
console.log(`\n== ${name}: ${cmd.join(' ')}`);
const r = Bun.spawnSync(cmd, { cwd: root, stdout: 'inherit', stderr: 'inherit' });
if (r.exitCode !== 0) { console.error(`\nci: ${name} failed (exit ${r.exitCode})`); process.exit(1); }
console.log(`== ${name} ok (${((Date.now() - t) / 1000).toFixed(1)}s)`);
}
console.log('\nci: all green');