Skip to content

Commit

Permalink
ci: debug publish
Browse files Browse the repository at this point in the history
Related #8240
  • Loading branch information
Jolg42 committed Aug 3, 2021
1 parent 8b1cfa6 commit 7e2cd5e
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions scripts/ci/publish.ts
Expand Up @@ -407,10 +407,13 @@ async function getNewPatchDevVersion(
packages: Packages,
patchBranch: string,
): Promise<string> {
const { minor, major } = getSemverFromPatchBranch(patchBranch)!
const currentPatch = await getCurrentPatchForMinor(minor)
const patchVersions = getSemverFromPatchBranch(patchBranch)
if (!patchVersions) {
throw new Error(`Could not get versions for ${patchBranch}`)
}
const currentPatch = await getCurrentPatchForMinor(patchVersions.minor)
const newPatch = currentPatch + 1
const newVersion = `${major}.${minor}.${newPatch}`
const newVersion = `${patchVersions.major}.${patchVersions.minor}.${newPatch}`
const versions = [...(await getAllVersions(packages, 'dev', newVersion))]
const maxIncrement = getMaxPatchVersionIncrement(versions)

Expand Down Expand Up @@ -514,9 +517,7 @@ async function getNextMinorStable() {
return increaseMinor(remoteVersion)
}

function getSemverFromPatchBranch(
version: string,
): { major: number; minor: number } | null {
function getSemverFromPatchBranch(version: string) {
const regex = /(\d+)\.(\d+)\.x/
const match = regex.exec(version)

Expand Down Expand Up @@ -631,8 +632,12 @@ async function publish() {
let prisma2Version
let tag: undefined | string
let tagForE2ECheck: undefined | string

const patchBranch = getPatchBranch()
console.log({ patchBranch })

const branch = await getPrismaBranch()
console.log({ branch })

// For branches that are named "integration/" we publish to the integration npm tag
if (branch && branch.startsWith('integration/')) {
Expand Down

0 comments on commit 7e2cd5e

Please sign in to comment.