(version: string)
| 439 | |
| 440 | // TODO: could probably use the semver package |
| 441 | function getSemverFromPatchBranch(version: string) { |
| 442 | // the branch name must match |
| 443 | // number.number.x like 3.0.x or 2.29.x |
| 444 | // as an exact match, no character before or after |
| 445 | const regex = /^(\d+)\.(\d+)\.x$/ |
| 446 | const match = regex.exec(version) |
| 447 | |
| 448 | if (match) { |
| 449 | return { |
| 450 | major: Number(match[1]), |
| 451 | minor: Number(match[2]), |
| 452 | } |
| 453 | } |
| 454 | |
| 455 | return undefined |
| 456 | } |
| 457 | |
| 458 | // TODO: name this to main |
| 459 | async function publish() { |
no outgoing calls
no test coverage detected