|
1 |
| -## How to release the next version of DevTools |
| 1 | +# How to release Dart DevTools |
| 2 | + |
| 3 | +> Note: there are parts of this release process that can only be completed by Googlers |
| 4 | +on the Dash team. If you are not a Googler on the Dash team, please reach out on the |
| 5 | +[#hackers-devtools](https://discord.com/channels/608014603317936148/1106667330093723668) |
| 6 | +Discord channel before trying to create a DevTools release. |
| 7 | + |
| 8 | +1. [Release into the Dart SDK master branch](#release-into-the-dart-sdk-master-branch) |
| 9 | +2. [Cherry-pick releases into the Dart SDK stable / beta branches](#cherry-pick-releases) |
| 10 | + |
| 11 | +## Release into the Dart SDK master branch |
2 | 12 |
|
3 | 13 | ### Configure/Refresh environment
|
4 | 14 |
|
@@ -168,3 +178,106 @@ have unreleased changes, publish these packages to pub.
|
168 | 178 | [README.md](https://github.com/flutter/devtools/blob/master/packages/devtools_app/release_notes/README.md)
|
169 | 179 | to add DevTools release notes to Flutter website and test them in DevTools.
|
170 | 180 | 2. Once release notes are submitted to the Flutter website, send an announcement to g/flutter-internal-announce with a link to the new release notes.
|
| 181 | + |
| 182 | +## Cherry-pick releases |
| 183 | + |
| 184 | +### Prepare the release in the `flutter/devtools` repo |
| 185 | + |
| 186 | +1. Find the [DevTools tag](https://github.com/flutter/devtools/tags) that you want to perform the |
| 187 | +cherry-pick release on top of. Then checkout that tag locally. For this example, we'll use `v2.29.0` |
| 188 | +as the base branch and `2.29.1` as the cherry-pick branch. |
| 189 | + ``` |
| 190 | + git checkout v2.29.0 |
| 191 | + ``` |
| 192 | +
|
| 193 | +2. Create a new branch for your cherry pick release. |
| 194 | + ``` |
| 195 | + git checkout -b 2.29.1 |
| 196 | + ``` |
| 197 | +
|
| 198 | +3. Cherry pick the commit(s) you want in this cherry-pick release, and bump the DevTools version number: |
| 199 | + ``` |
| 200 | + git cherry-pick <commit> |
| 201 | + devtools_tool update-version auto -t patch |
| 202 | + ``` |
| 203 | +
|
| 204 | +4. Commit your changes and push to the `upstream` remote. |
| 205 | + ``` |
| 206 | + git add . |
| 207 | + git commit -m "Prepare cherry-pick release - DevTools 2.29.1" |
| 208 | + git push upstream 2.29.1 |
| 209 | + ``` |
| 210 | +
|
| 211 | +Once you are completely satisfied with your changes, create a tag for this cherry-pick release. This |
| 212 | +tag is purely for the management and health of the `flutter/devtools` repo; it will not be used for the |
| 213 | +remainder of the cherry-pick release process. From the branch your are already on (e.g. `2.29.1`), run |
| 214 | +the following: |
| 215 | + ``` |
| 216 | + tool/tag_version.sh |
| 217 | + ``` |
| 218 | +
|
| 219 | +**To move on to the next step, you will need to take note of two values:** |
| 220 | +1) The name of the DevTools branch you just created (e.g. `2.29.1`) |
| 221 | +2) The commit hash that is at the tip of this branch (see https://github.com/flutter/devtools/branches). |
| 222 | +
|
| 223 | +### Manually run the DevTools Builder |
| 224 | +
|
| 225 | +Follow the instructions at [go/dart-engprod/devtools.md#cherry-picks](go/dart-engprod/devtools.md#cherry-picks) |
| 226 | +to trigger the DevTools builder. |
| 227 | +
|
| 228 | +### Create the cherry-pick CL in the Dart SDK |
| 229 | +
|
| 230 | +Checkout the Dart SDK branch you want to perform the cherry-pick on top of (e.g. `stable` or `beta`), |
| 231 | +and create a new branch: |
| 232 | +
|
| 233 | +``` |
| 234 | +git new-branch --upstream origin/<stable or beta> cherry-pick-devtools |
| 235 | +``` |
| 236 | +
|
| 237 | +Edit the "devtools_rev" entry in the Dart SDK [DEPS](https://github.com/dart-lang/sdk/blob/main/DEPS#L104) file |
| 238 | +to point to the cherry-pick release hash (the commit at the tip of the cherry-pick branch you created above). |
| 239 | +
|
| 240 | +Commit your changes and upload your CL: |
| 241 | +``` |
| 242 | +git add . |
| 243 | +git commit -m "Cherry-pick DevTools 2.29.1" |
| 244 | +git cl upload -s |
| 245 | +``` |
| 246 | +
|
| 247 | +### Create the merge commit in the `flutter/devtools` repo |
| 248 | +
|
| 249 | +This step can be performed while you are waiting for the Dart SDK cherry-pick CL to be reviewed. In order |
| 250 | +to ensure that the cherry-picked DevTools commit does not get GC'ed, we need to perform a merge commit |
| 251 | +from the branch we just created (e.g. `2.29.1`) onto the `flutter/devtools` protected branch (`master`). |
| 252 | + |
| 253 | +1. Create a pull request in the GitHub UI from the cherry-pick branch to the `master` branch. |
| 254 | + - Navigate to https://github.com/flutter/devtools/compare/\<cherry-pick-branch>, where \<cherry-pick-branch> |
| 255 | + is the branch you pushed up to the `upstream` remote with the cherry-picked commit(s) (e.g. `2.29.1`). |
| 256 | + - Click "Create pull request" |
| 257 | + - Resolve any merge conflicts by **accepting whatever is on master**. Once you do this, the PR should show |
| 258 | + changes in **zero** lines of code. |
| 259 | + - Ask a member of the DevTools team for review, but **DO NOT** squash and merge yet. |
| 260 | + |
| 261 | +2. Contact a member of the Dash team who has Admin access to the `flutter/devtools` repository settings |
| 262 | +(@godofredoc or @devoncarew). Ask them to: |
| 263 | + - temporarily modify the `flutter/devtools` repository settings to "allow merge commits at the repo level |
| 264 | + and remove `require linear history`". |
| 265 | + |
| 266 | + Provide them with a link to your PR for context. |
| 267 | + |
| 268 | +3. Once merge commits have been enabled for the repository, land your PR by selecting "Create a merge commit" from |
| 269 | +the merge dropdown options at the bottom of the PR. |
| 270 | + |
| 271 | +4. Once you have successfully merged your PR, reach back out to the person who modified the `flutter/devtools` |
| 272 | +repository settings for you and ask them to revert the settings change. |
| 273 | + |
| 274 | +### Create the cherry-pick issue in the Dart SDK |
| 275 | + |
| 276 | +Follow the [Request cherry-pick approval](https://github.com/dart-lang/sdk/wiki/Cherry-picks-to-a-release-channel#request-cherry-pick-approval) instructions to create a cherry-pick request against the Dart SDK. |
| 277 | + |
| 278 | +### Additional resources |
| 279 | +- `dart-lang/sdk` cherry-pick [Wiki](https://github.com/dart-lang/sdk/wiki/Cherry-picks-to-a-release-channel) |
| 280 | +- Flutter cherry-pick [Wiki](https://github.com/flutter/flutter/wiki/Flutter-Cherrypick-Process) |
| 281 | +- Example cherry-pick cl: https://dart-review.googlesource.com/c/sdk/+/334940 |
| 282 | +- Example cherry-pick issue: https://github.com/dart-lang/sdk/issues/53979 |
| 283 | +- Example merge commit on `flutter/devtools`: https://github.com/flutter/devtools/pull/6699 |
0 commit comments