From b26abb62177de4eeb5082da80910ef601efb5306 Mon Sep 17 00:00:00 2001 From: Elliott Brooks <21270878+elliette@users.noreply.github.com> Date: Wed, 26 Jun 2024 12:40:54 -0700 Subject: [PATCH] Update how we determine flutter candidate version (#7989) --- .github/workflows/flutter-prep.yaml | 5 +---- CONTRIBUTING.md | 4 ++++ flutter-candidate.txt | 2 +- tool/RELEASE_INSTRUCTIONS.md | 13 ++++++++++++- tool/latest_flutter_candidate.sh | 19 ++++++++++++------- 5 files changed, 30 insertions(+), 13 deletions(-) diff --git a/.github/workflows/flutter-prep.yaml b/.github/workflows/flutter-prep.yaml index ab3e9286311..6e7bcc3e63d 100644 --- a/.github/workflows/flutter-prep.yaml +++ b/.github/workflows/flutter-prep.yaml @@ -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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9a40bbacf0b..5dff6682b51 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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”` diff --git a/flutter-candidate.txt b/flutter-candidate.txt index 8d84894a996..d97ed57fa52 100644 --- a/flutter-candidate.txt +++ b/flutter-candidate.txt @@ -1 +1 @@ -3.23.0-12.0.pre +1c77696615558bf8f9fa7a6e2a473f438f1c03ca diff --git a/tool/RELEASE_INSTRUCTIONS.md b/tool/RELEASE_INSTRUCTIONS.md index 8f139d3c6bb..6a5117bbea7 100644 --- a/tool/RELEASE_INSTRUCTIONS.md +++ b/tool/RELEASE_INSTRUCTIONS.md @@ -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) @@ -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 @@ -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: diff --git a/tool/latest_flutter_candidate.sh b/tool/latest_flutter_candidate.sh index f709d24b53c..b90012e8ebb 100755 --- a/tool/latest_flutter_candidate.sh +++ b/tool/latest_flutter_candidate.sh @@ -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