-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
Additional release script options for publishing canary versions #12219
Conversation
- `branch` specifies a branch other than master - `local` skips pulling from the remote branch and checking CircleCI - `tag` specifies an npm dist tag other than `latest` or `next` We may add a higher-level `canary` option in the future.
scripts/release/config.js
Outdated
{ | ||
name: 'local', | ||
type: Boolean, | ||
description: "Don't pull changes from the remote branch. Also skips CI.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Don't push or pull changes from repo repo. Don't check CI status.
} | ||
} else { | ||
// Any tag besides `latest` is a prerelease | ||
isPrerelease = tag === 'latest'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this the exact opposite of what you want? (Don't you want !==)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ha yes I hit this exact bug when I did the release and neglected to include the change in the commit :D
const errors = []; | ||
const isPrerelease = semver.prerelease(version); | ||
const tag = isPrerelease ? 'next' : 'latest'; | ||
let isPrerelease; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think isPrerelease
should always be determined by:
isPrerelease = semver.prerelease(version);
And I think the script should fail (with an error) if we ever try to combine the "latest" tag with a version that isn't x.x.x (eg 16.3.0-alpha.0 and "latest" should be an error)
- Updated description of `local` option - Throws if the `latest` tag is specified for a prerelease version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM
…ebook#12219) * Additional release script options for publishing canary versions - `branch` specifies a branch other than master - `local` skips pulling from the remote branch and checking CircleCI - `tag` specifies an npm dist tag other than `latest` or `next` We may add a higher-level `canary` option in the future. * Address Brian's feedback: - Updated description of `local` option - Throws if the `latest` tag is specified for a prerelease version
branch
specifies a branch other than masterlocal
skips pulling from the remote branch and checking CircleCItag
specifies an npm dist tag other thanlatest
ornext
We may add a higher-level
canary
option in the future.Test plan: I used this to publish 16.4.0-alpha.7926752 and it worked.