* Alpha version increment — mirrors the inline Node script in * create-release-pr.yml "Determine next version" step for the alpha branch. * * X.Y.Z-alpha.N → X.Y.Z-alpha.(N+1) * X.Y.Z → (X+1).0.0-alpha.1 (no alpha suffix yet)
(current)
| 152 | * X.Y.Z → (X+1).0.0-alpha.1 (no alpha suffix yet) |
| 153 | */ |
| 154 | function nextAlphaVersion(current) { |
| 155 | const m = current.match(/^(\d+\.\d+\.\d+)-alpha\.(\d+)$/); |
| 156 | if (m) { |
| 157 | return `${m[1]}-alpha.${parseInt(m[2], 10) + 1}`; |
| 158 | } |
| 159 | const parts = current.replace(/-.*/, '').split('.'); |
| 160 | const nextMajor = parseInt(parts[0], 10) + 1; |
| 161 | return `${nextMajor}.0.0-alpha.1`; |
| 162 | } |
| 163 | |
| 164 | // --------------------------------------------------------------------------- |
| 165 | // Helpers: temporary git repo |
no test coverage detected