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

Additional release script options for publishing canary versions #12219

Merged
merged 2 commits into from Feb 13, 2018

Conversation

acdlite
Copy link
Collaborator

@acdlite acdlite commented Feb 13, 2018

  • 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.

Test plan: I used this to publish 16.4.0-alpha.7926752 and it worked.

- `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.
{
name: 'local',
type: Boolean,
description: "Don't pull changes from the remote branch. Also skips CI.",
Copy link
Contributor

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';
Copy link
Contributor

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 !==)

Copy link
Collaborator Author

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;
Copy link
Contributor

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
Copy link
Contributor

@bvaughn bvaughn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM

@acdlite acdlite merged commit 1fd205a into facebook:master Feb 13, 2018
rhagigi pushed a commit to rhagigi/react that referenced this pull request Apr 19, 2018
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants