Skip to content
This repository was archived by the owner on Nov 11, 2024. It is now read-only.

Commit c678f9c

Browse files
hramosfacebook-github-bot
authored andcommitted
Update Releases.md
Summary: Cleanup and clarification based on my experience performing some patch releases recently. Closes facebook/react-native#15020 Differential Revision: D5434893 Pulled By: hramos fbshipit-source-id: a4f65f41cd112dd3225556d7199e7c23374a1b58
1 parent 4a25473 commit c678f9c

File tree

1 file changed

+99
-33
lines changed

1 file changed

+99
-33
lines changed

Releases.md

Lines changed: 99 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
The list of releases with notes can be found at:
2-
https://github.com/facebook/react-native/releases
1+
# Releases Guide
2+
3+
This document serves as guide for release coordinators. You can find a list of releases and their release notes at https://github.com/facebook/react-native/releases
34

45
## Release schedule
56

7+
React Native follows a monthly release train. Every month, a new branch created off master enters the Release Candidate phase, and the previous Release Candidate branch is released and considered stable.
8+
9+
610
| Version | RC release | Stable release |
711
| ------- | ------------------- | ---------------- |
812
| 0.38.0 | week of November 7 | November 21 |
@@ -21,15 +25,16 @@ https://github.com/facebook/react-native/releases
2125
| ... | ... | ... |
2226

2327
-------------------
28+
2429
## How to cut a new release branch
2530

26-
#### Prerequisites
31+
### Prerequisites
2732

2833
The following are required for the local test suite to run:
2934
- macOS with [Android dev environment set up](https://github.com/facebook/react-native/blob/master/ReactAndroid/README.md)
3035
- At least 0.2.0 [react-native-cli](https://www.npmjs.com/package/react-native-cli) installed globally
3136

32-
#### Check everything works
37+
### Step 1: Check everything works
3338

3439
Before cutting a release branch, make sure CI systems [Travis](https://travis-ci.org/facebook/react-native) and [Circle](https://circleci.com/gh/facebook/react-native) are green.
3540

@@ -45,7 +50,7 @@ This script bundles a react-native package locally and passes it to the `react-n
4550

4651
After `npm install` completes, the script prints a set of manual checks you have to do to ensure the release you are preparing is working as expected on both platforms.
4752

48-
#### Cut a release branch and push to github
53+
### Step 2: Cut a release branch and push to GitHub
4954

5055
Run:
5156

@@ -56,13 +61,15 @@ git checkout -b <version_you_are_releasing>-stable
5661
./scripts/bump-oss-version.js <exact-version_you_are_releasing>
5762
# e.g. ./scripts/bump-oss-version.js 0.50.0-rc
5863
# You can use the --remote option to specify a Git remote other than the default "origin"
64+
git push --tags
65+
git push
5966
```
6067

6168
Circle CI will automatically run the tests and publish to npm with the version you have specified (e.g `0.50.0-rc`) and tag `next` meaning that this version will not be installed for users by default.
6269

63-
Go to [Circle CI](https://circleci.com/gh/facebook/react-native), look for your branch on the left side and look the npm publish step.
70+
Go to [Circle CI](https://circleci.com/gh/facebook/react-native) and look for the build triggered by your push (e.g. _0.50-stable, [0.50.0] Bump version numbers_), then scroll down to the npm publish step to verify the package was published successfully (the build will be red if not).
6471

65-
#### Make sure we have release notes
72+
### Step 3: Write the release notes
6673

6774
Write the release notes, or post in [React Native Core Contributors](https://www.facebook.com/groups/reactnativeoss/) that the RC is ready to find a voluteer. You can also use [react-native-release-notes](https://github.com/knowbody/react-native-release-notes) to generate a draft of release notes.
6875

@@ -85,87 +92,146 @@ Before posting the list of changes, consider asking one of contributors for thei
8592

8693
**Important**: For release candidate releases, make sure to check "This is a pre-release".
8794

88-
#### Update `Breaking Changes` document
95+
### Step 4: Update `Breaking Changes` document
8996

9097
Once the release is cut, go to the [page](https://github.com/facebook/react-native/wiki/Breaking-Changes) where all breaking changes are listed and create section for the release. Don't forget to move all breaking changes from `master` that are now part of the release.
9198

9299
When finished and there are breaking changes, include them in the release notes you just created.
93100

94-
#### Tweet about the rc release
101+
### Step 5: Tweet about the RC release
95102

96103
Tweet about it! Link to release notes and say "please report issues" and link to the master issue to track bugs you created.
97104

98-
## IMPORTANT: Track bug reports from the community during the following month, ping owners to get them fixed
99-
100-
A good way to do this is to create a github issue and post about it so people can report bugs. Examples: [#14840](https://github.com/facebook/react-native/issues/14840), [#6087](https://github.com/facebook/react-native/issues/6087), [#5201](https://github.com/facebook/react-native/issues/5201)
105+
### Step 6: IMPORTANT: Track bug reports from the community during the following month, ping owners to get them fixed
101106

102-
**Only cherry-pick small and non-risky bug fixes**. **Don't pick new features into the release** as this greatly increases the risk of something breaking. The main point of the RC is to let people to use it for a month and fix the most serious bugs.
107+
Now that the release is out in the open, go ahead and create a GitHub issue titled "[[0.XX-RC] Commits to cherry-pick](https://github.com/facebook/react-native/issues/14713)" where 0.XX matches the release version. Use this issue to track bugs that have been reported for this particular release, including commits that should be cherry-picked in cases that a fix cannot wait until the next release.
103108

104109
-------------------
105110

106111
## How to release an RC update (e.g. 0.50.0-rc.1, 0.50.0-rc.2)
107112

108-
After cherry-picking 1-2 bug fixes, it is a good idea to do a new RC release so that people can test again. Having a few RC releases can also help people bisect in case we cherry-pick a bad commit by mistake.
113+
The release is now in the open, people are finding bugs, and fixes have landed in master. People have been nominating fixes in the issue you created above. Use your best judgment to decide which commits merit an RC update. It's a good idea to do a new RC release when several small and non-risky bugs have been fixed. Having a few RC releases can also help people bisect in case we cherry-pick a bad commit by mistake.
114+
115+
**Only cherry-pick small and non-risky bug fixes**. **Don't pick new features into the release** as this greatly increases the risk of something breaking. The main point of the RC is to let people to use it for a month and fix the most serious bugs.
116+
117+
118+
### Step 1: Check out the release branch
119+
120+
Follow these steps to check out the release branch:
109121

110122
```bash
111-
git checkout 0.version_you_are_releasing-stable
123+
git checkout <version_you_are_patching>-stable
112124
# e.g. git checkout 0.50-stable
113125

114-
git pull origin 0.version_you_are_releasing-stable
126+
git pull origin <version_you_are_patching>-stable
115127
# e.g. git pull origin 0.50-stable
128+
```
116129

117-
# Cherry-pick those commits
130+
> If you don't have a local checkout of the release branch, you can run the following instead:
131+
> `git checkout -b <version_you_are_patching>-stable -t origin/<version_you_are_patching>-stable`
132+
133+
### Step 2: Cherry-pick commits
134+
135+
Now, cherry-pick those commits:
136+
137+
```
118138
git cherry-pick commitHash1
139+
```
140+
141+
### Step 3: IMPORTANT: Test everything again (Chrome debugging, Reload JS, Hot Module Reloading)
119142

120-
# IMPORTANT: Test everything again (Chrome debugging, Reload JS, Hot Module Reloading)
143+
Go through the same process as earlier to test the release:
144+
145+
```
121146
./scripts/test-manual-e2e.sh
122147
```
123148

124-
If everything worked:
149+
### Step 4: Bump the version number
150+
151+
If everything worked, run the following to bump the version number:
125152

126153
```bash
127154
./scripts/bump-oss-version.js <exact_version_you_are_releasing>
128155
# e.g. ./scripts/bump-oss-version.js 0.50.0-rc.1
156+
```
157+
158+
### Step 5: Push to GitHub
159+
160+
Finally, push the new tags and commits to GitHub:
161+
162+
```
163+
git push --tags
164+
git push
129165
````
130166
167+
Again, Circle CI will automatically run the tests and publish to npm with the version you have specified (e.g `0.50.0-rc.1`).
168+
169+
### Step 6: Update the release notes
170+
171+
Go to https://github.com/facebook/react-native/releases and find the release notes for this release candidate. Edit them so that they now point to the tag that you've just created. We want single release notes per version. For example, if there is v0.50.0-rc and you just released v0.50.0-rc.1, the release notes should live on the v0.50.0-rc.1 tag at https://github.com/facebook/react-native/tags
172+
131173
-------------------
132174
133-
## How to do the final release (e.g. 0.50.0, 0.50.1)
175+
## How to do the final stable release (e.g. 0.50.0, 0.50.1)
176+
177+
A stable release is promoted roughly a month after the release branch is cut (refer to the schedule above). The release may be delayed for several reasons, including major issues in the release candidate. Make sure that all bug fixes that have been nominated in your tracking issue have been addressed as needed. Avoid cherry-picking commits that have not been vetted in the release candidate phase at this point.
134178
135-
Roughly a month after the branch cut (see the release schedule above) it's time to promote the last RC to a real release.
179+
Once you are sure that the release is solid, perform the following steps. Note that they're similar to the steps you may have followed earlier when patching the release candidate, but we're not cherry-picking any additional commits at this point.
136180
137-
Once all bugfixes have been cherry-picked and you're sure the release is solid (example: [#6087](https://github.com/facebook/react-native/issues/6087)), do the release:
181+
### Step 1: Check out the release branch
138182
139183
```bash
140-
git checkout 0.version_you_are_releasing-stable
184+
git checkout <version_you_are_patching>-stable
141185
# e.g. git checkout 0.50-stable
142186
143-
git pull origin 0.version_you_are_releasing-stable
187+
git pull origin <version_you_are_patching>-stable
144188
# e.g. git pull origin 0.50-stable
189+
```
145190

146-
# Cherry-pick those commits, if any
147-
git cherry-pick commitHash1
191+
> If you don't have a local checkout of the release branch, you can run the following instead:
192+
> `git checkout -b <version_you_are_patching>-stable -t origin/<version_you_are_patching>-stable`
193+
194+
### Step 2: IMPORTANT: Test everything again (Chrome debugging, Reload JS, Hot Module Reloading)
195+
196+
It's **important** to test everything again: you don't want to cut a release with a major blocking issue!
148197

149-
# IMPORTANT: If you cherry-picked any commits, test everything again (Chrome debugging, Reload JS, Hot Module Reloading)
198+
```
150199
./scripts/test-manual-e2e.sh
151200
```
152201

202+
### Step 3: Bump the version number
203+
153204
If everything worked:
154205

155206
```bash
156207
./scripts/bump-oss-version.js <exact_version_you_are_releasing>
157208
# e.g. ./scripts/bump-oss-version.js 0.50.0
158209
```
159210

160-
#### Update the release notes
211+
### Step 4: Push to GitHub
212+
213+
Finally, push the new tags and commits to GitHub:
214+
215+
```
216+
git push --tags
217+
git push
218+
```
161219

162-
Once you see the version in the top left corner of the website has been updated:
163-
Move the release notes to the tag you've just created. We want single release notes per version,
164-
for example if there is v0.50.0-rc and later we release v0.50.0, the release notes should live on v0.50.0:
220+
As with the release candidate, Circle CI will automatically run the tests and publish to npm with the version you have specified (e.g `0.50.0`).
221+
222+
Go to [Circle CI](https://circleci.com/gh/facebook/react-native) and look for the build triggered by your push (e.g. _0.50-stable, [0.50.0] Bump version numbers_), then scroll down to the npm publish step to verify the package was published successfully (the build will be red if not).
223+
224+
This will now become the latest release, and will be installed by users by default. At this point, the website will be updated and the docs for this release will be displayed by default.
225+
226+
### Step 5: Update the release notes
227+
228+
Once you see that the website is displaying the version that you have just created, you will need to update the release notes. Move the release notes from the release candidate, to the tag that you've just created. We want single release notes per version. For example, if there is v0.50.0-rc and later we release v0.50.0, the release notes should live on v0.50.0:
165229
https://github.com/facebook/react-native/tags
166230

167231
For non-RC releases: Uncheck the box "This is a pre-release" and publish the notes.
168232

169-
#### Tweet about it
233+
### Supporting the release
234+
235+
Sometimes things don't go well and a major issue is missed during the release candidate phase. If a fix cannot wait until the next release is cut, it may be necessary to cherry-pick it into the current stable release. Go back to your `[0.XX-RC] Commits to cherry-pick` issue and rename it to `[0.XX] Commits to cherry-pick`, then add a comment stating that any cherry-pick requests from then on will be applied to the stable release.
170236

171-
Tweet about it! :) ([example tweet](https://twitter.com/grabbou/status/701510554758856704))
237+
**The same guidelines for RC cherry-picks apply here. If anything, the bar for cherry-picking into a stable release is higher.** Stick to commits that fix blocking issues. Examples may be RedBoxes on newly generated projects, broken upgrade flows with no workaround, or bugs affecting the compiling and/or building of projects.

0 commit comments

Comments
 (0)