| 1 | #!/usr/bin/env node |
| 2 | import { resolve, dirname } from "node:path"; |
| 3 | import { fileURLToPath } from "node:url"; |
| 4 | import { currentRelease, refreshReleaseDocs } from "./release-docs-lib.mjs"; |
| 5 | |
| 6 | const webDir = resolve(dirname(fileURLToPath(import.meta.url)), ".."); |
| 7 | let snapshot; |
| 8 | try { |
| 9 | snapshot = refreshReleaseDocs(webDir, currentRelease()); |
| 10 | } catch (error) { |
| 11 | console.error(error.message); |
| 12 | process.exit(1); |
| 13 | } |
| 14 | if (snapshot) { |
| 15 | console.log(`[release-docs] ${snapshot.tag}: ${snapshot.topics.length} topics, ${snapshot.omitted.length} omitted`); |
| 16 | } |
| 17 |