cloudflare/kumo
Publicmirrored fromhttps://github.com/cloudflare/kumoAvailable
ci/scripts/ensure-changeset-config.ts
22lines · modecode
| 1 | #!/usr/bin/env tsx |
| 2 | |
| 3 | import { existsSync } from "fs"; |
| 4 | import { join } from "path"; |
| 5 | |
| 6 | const configPath = join(process.cwd(), ".changeset", "config.json"); |
| 7 | |
| 8 | if (!existsSync(configPath)) { |
| 9 | console.error("❌ Changesets is not initialized for this repo."); |
| 10 | console.error(""); |
| 11 | console.error(`Missing required file: ${configPath}`); |
| 12 | console.error(""); |
| 13 | console.error("To fix:"); |
| 14 | console.error(" 1) Restore it from git if it was deleted:"); |
| 15 | console.error(" git checkout -- .changeset/config.json"); |
| 16 | console.error( |
| 17 | " 2) If this repo truly does not have Changesets set up, run:", |
| 18 | ); |
| 19 | console.error(" pnpm changeset init"); |
| 20 | console.error(""); |
| 21 | process.exit(1); |
| 22 | } |
| 23 | |