12 lines
420 B
JavaScript
12 lines
420 B
JavaScript
#!/usr/bin/env bun
|
|
import { readFileSync } from "node:fs";
|
|
import { cliDocPath, updateCliDoc } from "./generate-cli-md.mjs";
|
|
|
|
const content = readFileSync(cliDocPath, "utf8");
|
|
if (content !== updateCliDoc(content)) {
|
|
console.error("CLI command documentation is stale. Run bun run generate:cli-md and commit the result.");
|
|
process.exitCode = 1;
|
|
} else {
|
|
console.log("CLI command documentation is synchronized.");
|
|
}
|