MCPcopy
hub / github.com/prisma/prisma / getSemverFromPatchBranch

Function getSemverFromPatchBranch

scripts/ci/publish.ts:441–456  ·  view source on GitHub ↗
(version: string)

Source from the content-addressed store, hash-verified

439
440// TODO: could probably use the semver package
441function 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
459async function publish() {

Callers 2

getNewPatchDevVersionFunction · 0.85
getPatchBranchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected