Skip to content

Commit

Permalink
Update how we determine flutter candidate version (#7989)
Browse files Browse the repository at this point in the history
  • Loading branch information
elliette authored Jun 26, 2024
1 parent 1e79aed commit b26abb6
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 13 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/flutter-prep.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,8 @@ jobs:

- name: Get Latest Flutter Candidate
id: flutter-candidate
# TODO(https://github.com/flutter/devtools/issues/7939): Switch back to using
# LATEST_FLUTTER_CANDIDATE=$(./tool/latest_flutter_candidate.sh)
# once Flutter rolls are tagged again:
run: |
LATEST_FLUTTER_CANDIDATE=1c77696615558bf8f9fa7a6e2a473f438f1c03ca
LATEST_FLUTTER_CANDIDATE=$(./tool/latest_flutter_candidate.sh)
echo "FLUTTER_CANDIDATE=$LATEST_FLUTTER_CANDIDATE" >> $GITHUB_OUTPUT
- name: Load Cached Flutter SDK
Expand Down
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ of launch configurations for running and debugging DevTools:
### Workflow for making changes

1. Change your local Flutter SDK to the latest flutter candidate branch: `devtools_tool update-flutter-sdk --from-path`

> Note: Until https://github.com/flutter/devtools/issues/7939 is fixed, run
`devtools_tool update-flutter-sdk --use-cache` instead.

2. Create a branch from your cloned DevTools repo: `git checkout -b myBranch`
3. Ensure your branch, dependencies, and generated code are up-to-date: `devtools_tool sync`
4. Implement your changes, and commit to your branch: `git commit -m “description”`
Expand Down
2 changes: 1 addition & 1 deletion flutter-candidate.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.23.0-12.0.pre
1c77696615558bf8f9fa7a6e2a473f438f1c03ca
13 changes: 12 additions & 1 deletion tool/RELEASE_INSTRUCTIONS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
> [!NOTE]
> [!NOTE]
> There are parts of this release process that can only be completed by Googlers
on the Dash team. If you are not a Googler on the Dash team, please reach out on the
[#hackers-devtools](https://discord.com/channels/608014603317936148/1106667330093723668)
Expand Down Expand Up @@ -69,6 +69,8 @@ Make sure:
git checkout main; git rebase-update
```

> Note: Until https://github.com/flutter/devtools/issues/7939, skip this step.
2. Your Flutter SDK in `devtools/tool/flutter-sdk` and the one on PATH are updated to the latest candidate release branch:
```shell
devtools_tool update-flutter-sdk --update-on-path
Expand All @@ -91,6 +93,15 @@ This command will automatically:
- create a PR for release changes
- update your local version of flutter to the latest flutter candidate

**The following is required until https://github.com/flutter/devtools/issues/7939 is fixed:**

1. Update the `flutter-candidate.txt` to the latest Flutter candidate in g3 (see instructions in DevTools Release Rotation email). This change should get committed with the DevTools release PR so that we know which version it was released with.

2. Update your Flutter SDK in `devtools/tool/flutter-sdk` and the one on PATH to the latest Flutter candidate:
```shell
devtools_tool update-flutter-sdk --update-on-path --use-cache
```

#### Verify the version changes for the Release PR

Verify the changes in the release PR contain:
Expand Down
19 changes: 12 additions & 7 deletions tool/latest_flutter_candidate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,17 @@ set -e

# To determine the most recent candidate available on g3 find the largest
# tag that matches the version X.Y.Z-M.N.pre, where Z=0 and N=0.(i.e. X.Y.0-M.0.pre)
LATEST_FLUTTER_CANDIDATE=$(git ls-remote --tags --sort='-v:refname' https://flutter.googlesource.com/mirrors/flutter/ \
| grep -E "refs/tags/[0-9]+.[0-9]+.0-[0-9]+.0.pre" \
| cut -f2 \
| sort --version-sort \
| tail -n1 \
| sed 's/^.*\(flutter.*\)$/\1/'\
)

# TODO(https://github.com/flutter/devtools/issues/7939): Switch back to using the
# commented out git command below once Flutter rolls are tagged again:
LATEST_FLUTTER_CANDIDATE=`cat ./flutter-candidate.txt`

# LATEST_FLUTTER_CANDIDATE=$(git ls-remote --tags --sort='-v:refname' https://flutter.googlesource.com/mirrors/flutter/ \
# | grep -E "refs/tags/[0-9]+.[0-9]+.0-[0-9]+.0.pre" \
# | cut -f2 \
# | sort --version-sort \
# | tail -n1 \
# | sed 's/^.*\(flutter.*\)$/\1/'\
# )

echo $LATEST_FLUTTER_CANDIDATE

0 comments on commit b26abb6

Please sign in to comment.