Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(scripts/performRelease): add comment, fix typo #1113

Merged
merged 1 commit into from
Mar 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions scripts/performRelease/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -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);
}

Expand Down
3 changes: 3 additions & 0 deletions scripts/performRelease/performLernaRelease.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 =>
Expand Down