| 31 | /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[A-Za-z-][0-9A-Za-z-]*)(?:\.(?:0|[1-9]\d*|\d*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\+([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?$/; |
| 32 | |
| 33 | const parseArgs = (argv: ReadonlyArray<string>): ReleaseCliOptions => { |
| 34 | let dryRun = false; |
| 35 | |
| 36 | for (const arg of argv) { |
| 37 | if (arg === "--dry-run") { |
| 38 | dryRun = true; |
| 39 | continue; |
| 40 | } |
| 41 | |
| 42 | throw new Error(`Unknown argument: ${arg}`); |
| 43 | } |
| 44 | |
| 45 | return { dryRun }; |
| 46 | }; |
| 47 | |
| 48 | const runCommand = async (input: CommandInput): Promise<CommandOutput> => { |
| 49 | const proc = Bun.spawn([input.command, ...input.args], { |