diff --git a/scripts/performRelease/index.ts b/scripts/performRelease/index.ts index b4051154a..8bf14b5b8 100644 --- a/scripts/performRelease/index.ts +++ b/scripts/performRelease/index.ts @@ -46,7 +46,7 @@ async function performRelease() { commitsSinceTag.map(commit => commit.sha), ); - const isPrelease = await performLernaRelease(prsSinceLastTag); + const isPreRelease = await performLernaRelease(prsSinceLastTag); const newTagsRequest = await fetchTags(client); const newTag = newTagsRequest.data[0]; @@ -56,8 +56,8 @@ async function performRelease() { process.exit(0); } - // update changelog - if (!isPrelease) { + // update changelog only for non-pre-releases + if (!isPreRelease) { await updateChangelog(prsSinceLastTag, newTag.name); } diff --git a/scripts/performRelease/performLernaRelease.ts b/scripts/performRelease/performLernaRelease.ts index 77d741c6d..114188d5f 100644 --- a/scripts/performRelease/performLernaRelease.ts +++ b/scripts/performRelease/performLernaRelease.ts @@ -19,6 +19,9 @@ export default async function performLernaRelease(prsSinceLastTag: PR[]) { // run lerna based on the type of release const isPreRelease = releasePRsSinceLastTag.some(pr => + // note that this logic requires that all alpha tags be removed from PRs + // in order to trigger a non-alpha release. git keeps tag history so + // preserving context should not be an issue pr.labels.some(label => label.name === ALPHA_RELEASE), ); const isMinor = releasePRsSinceLastTag.some(pr =>