Skip to content

Commit a57330d

Browse files
committed
z fix and readme changes
1 parent aa2a0ea commit a57330d

File tree

2 files changed

+63
-99
lines changed

2 files changed

+63
-99
lines changed

tool/README.md

Lines changed: 59 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -19,98 +19,41 @@ Make sure:
1919

2020
### Prepare the release
2121

22-
#### Create a branch for your release.
23-
24-
```shell
25-
cd ~/path/to/devtools
26-
```
27-
28-
```shell
29-
git checkout master && \
30-
git pull upstream master && \
31-
git checkout -b release_$(date +%s);
32-
```
3322

3423
#### Update the DevTools version number
3524

36-
##### Releasing a clean version
37-
Run the `tool/update_version.dart` script to update the DevTools version.
38-
- When doing a release, the pre-releases can be stripped with:
39-
```shell
40-
dart tool/update_version.dart auto --type release
41-
```
42-
- Create a PR with this cleaned version number to denote the official release of Devtools under that number
43-
44-
Verify:
45-
* that this script updated the pubspecs under packages/
46-
* updated all references to those packages.
47-
* make sure that the version constant in `packages/devtools_app/lib/devtools.dart` was updated
25+
- Make sure your working branch is clean
26+
- Run the `tool/release_helper.sh` script with `minor` or `major`.
27+
`./tool/release_helper.sh [minor|major]`
28+
- This creates 2 branches for you:
29+
- Clean Branch
30+
- Next Branch
31+
- You will need to prepare and submit both of these branches, when you are doing a full release.
32+
- ** For your convenience, the `tool/release_helper.sh` script exports the followinging two variables to the terminal it is run in:**
33+
- `$DEVTOOLS_CLEAN_BRANCH`
34+
- `$DEVTOOLS_NEXT_BRANCH`
35+
36+
#### Verify the version changes
37+
> For both the $DEVTOOLS_CLEAN_BRANCH and the $DEVTOOLS_NEXT_BRANCH branches
38+
39+
Verify the version changes:
40+
- that release_helper.sh script updated the pubspecs under packages/
41+
- updated all references to those packages.
42+
- make sure that the version constant in `packages/devtools_app/lib/devtools.dart` was updated
4843

4944
These packages always have their version numbers updated in lock, so we don't have to worry about versioning.
5045

51-
##### Updating to the next version
52-
After merging a cleaned version of the current release, you can then perform a `patch`, `minor`, or `major` update.
53-
This version can be pushed up in a separate PR to denote the start of this next version.
46+
#### Manually review the CHANGELOG.md
47+
> For both the $DEVTOOLS_CLEAN_BRANCH and the $DEVTOOLS_NEXT_BRANCH branches
5448
55-
> NOTE: In the future these two released commits will automatically be handled by GitHub.
56-
57-
- For regular monthly releases, use `minor`:
58-
```shell
59-
dart tool/update_version.dart auto --type minor
60-
```
61-
- To manually set the version:
62-
```shell
63-
dart tool/update_version.dart manual --new-version 1.2.3
64-
```
65-
- To automatically update the version by `major`, `minor`, `patch`, or `dev`:
66-
```shell
67-
dart tool/update_version.dart auto --type patch
68-
```
69-
- Pre-release versions can be stripped with:
70-
```shell
71-
dart tool/update_version.dart auto --type release
72-
```
73-
74-
#### Update the CHANGELOG.md (for non-dev releases)
75-
76-
* Use the tool `generate-changelog` to automatically update the `packages/devtools/CHANGELOG.md` file.
77-
78-
```shell
79-
cd ~/path/to/devtools && \
80-
dart tool/bin/repo_tool.dart generate-changelog;
81-
```
82-
83-
* The `generate-changelog` script is
84-
intended to do the bulk of the work, but still needs manual review.
8549
* Verify
8650
* that the version for the CHANGELOG entry was correctly generated
8751
* that the entries don't have any syntax errors.
8852

89-
#### Push the local branch
90-
91-
```shell
92-
NEW_DEVTOOLS_VERSION=2.7.0 # Change this to the new version
93-
```
94-
95-
```shell
96-
git add . && \
97-
git commit -m "Prepare for $NEW_DEVTOOLS_VERSION release." && \
98-
git push origin release_$NEW_DEVTOOLS_VERSION;
99-
```
100-
101-
From the git GUI tool or from github.com directly:
102-
1. Create a PR.
103-
2. Add the entry about the created PR to the CHANGELOG.md manually, and push to the PR.
104-
3. Receive an LGTM, squash and commit.
105-
106-
### Test the release
107-
108-
- Checkout the commit you just created,
109-
- or remain on the branch you just landed the prep PR from.
110-
```shell
111-
git checkout 8881a7caa9067471008a8e00750b161f53cdb843
112-
```
53+
### Test the CLEAN_BRANCH
54+
> You only need to do this on the $DEVTOOLS_CLEAN_BRANCH branch
11355
56+
- Checkout the $DEVTOOLS_CLEAN_BRANCH,
11457
- Build the DevTools binary and run it from your local Dart SDK.
11558
- From the main devtools/ directory.
11659
```shell
@@ -137,6 +80,19 @@ From the git GUI tool or from github.com directly:
13780
git checkout . && \
13881
git clean -f -d;
13982
```
83+
#### Push the DEVTOOLS_CLEAN_BRANCH
84+
85+
> Ensure you are still on the $DEVTOOLS_CLEAN_BRANCH
86+
87+
```shell
88+
git push -u origin $DEVTOOLS_CLEAN_BRANCH
89+
```
90+
91+
From the git GUI tool or from github.com directly:
92+
1. Create a PR.
93+
2. Add the entry about the created PR to the CHANGELOG.md manually, and push to the PR.
94+
3. Receive an LGTM, squash and commit.
95+
14096

14197
### Tag the release
14298
- Checkout the commit from which you want to release DevTools
@@ -150,6 +106,21 @@ From the git GUI tool or from github.com directly:
150106
tool/tag_version.sh;
151107
```
152108

109+
### Verify and Submit the release notes
110+
111+
See the release notes
112+
[README.md](https://github.com/flutter/devtools/blob/master/packages/devtools_app/lib/src/framework/release_notes/README.md)
113+
for details on where to add DevTools release notes to Flutter website and how to test them.
114+
115+
1. The release notes for the clean version can be found in [NEXT_RELEASE_NOTES.md](./release_notes/NEXT_RELEASE_NOTES.md)
116+
2. Follow the release notes
117+
[README.md](https://github.com/flutter/devtools/blob/master/packages/devtools_app/lib/src/framework/release_notes/README.md)
118+
to add these DevTools release notes to Flutter website
119+
- make sure to also follow the instructions to test them.
120+
121+
122+
[1]: ../packages/devtools_app/lib/src/framework/release_notes/release-notes-next.md
123+
153124
### Upload the DevTools binary to CIPD
154125
- Use the update.sh script to build and upload the DevTools binary to CIPD:
155126
```shell
@@ -213,19 +184,12 @@ From the git GUI tool or from github.com directly:
213184
flutter pub publish
214185
```
215186
216-
### Write release notes for the release
217-
Release notes should contain details about the user-facing changes included in the release.
218-
219-
These notes are shown directly in DevTools when a user opens a new version of DevTools.
220-
221-
1. Request the team to verify their important user facing changes are documented in
222-
[release-notes-next.md][1].
223-
224-
2. See the release notes
225-
[README.md](https://github.com/flutter/devtools/blob/master/packages/devtools_app/lib/src/framework/release_notes/README.md)
226-
for details on where to add DevTools release notes to Flutter website and how to test them.
227-
228-
3. Copy the content of [release-notes-template.md](../packages/devtools_app/lib/src/framework/release_notes/release-notes-template.md) to [release-notes-next.md][1], to contain
229-
draft for the next release.
187+
### Push the DEVTOOLS_NEXT_BRANCH
188+
```shell
189+
git checkout $DEVTOOLS_NEXT_BRANCH
190+
git push -u origin $DEVTOOLS_NEXT_BRANCH
191+
```
230192
231-
[1]: ../packages/devtools_app/lib/src/framework/release_notes/release-notes-next.md
193+
From the git GUI tool or from github.com directly:
194+
1. Create a PR.
195+
3. Receive an LGTM, squash and commit.

tool/release_helper.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
#!/bin/bash -e
1+
#!/bin/bash -ex
22

33
DEVTOOLS_REMOTE=$(git remote -v | grep "flutter/devtools.git" | grep "(fetch)"| tail -n1 | cut -w -f1)
44
TYPE=$1
55

6-
if [ -z ${TYPE+x} ] ; then
6+
if [ -z "$TYPE" ] ; then
77
echo "$0 expects a type as a first parameter"
88
exit 1
99
fi
1010

11-
if [ -z ${DEVTOOLS_REMOTE+x} ] ; then
11+
if [ -z "$DEVTOOLS_REMOTE" } ] ; then
1212
echo "Couldn't find a remote that points to flutter/devtools.git"
1313
exit 1
1414
fi
1515

1616
STATUS=$(git status -s)
17-
if [[ -z ${STATUS+x} ]] ; then
17+
if [[ ! -z "$STATUS" ]] ; then
1818
echo "Make sure your working directory is clean before running the helper"
1919
exit 1
2020
fi

0 commit comments

Comments
 (0)