Skip to content

Commit 6db4a95

Browse files
Update invocations to run from local source
1 parent 91d967c commit 6db4a95

File tree

10 files changed

+30
-21
lines changed

10 files changed

+30
-21
lines changed

.ci/scripts/build_examples_win32.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
# Use of this source code is governed by a BSD-style license that can be
44
# found in the LICENSE file.
55

6-
dart pub global run flutter_plugin_tools build-examples --windows \
6+
dart ./script/tool/bin/flutter_plugin_tools.dart build-examples --windows \
77
--packages-for-branch --log-timing

.ci/scripts/create_all_packages_app.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
# Use of this source code is governed by a BSD-style license that can be
44
# found in the LICENSE file.
55

6-
dart pub global run flutter_plugin_tools create-all-packages-app \
6+
dart ./script/tool/bin/flutter_plugin_tools.dart create-all-packages-app \
77
--output-dir=. --exclude script/configs/exclude_all_packages_app.yaml

.ci/scripts/custom_package_tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
# script/configs/linux_only_custom_test.yaml
99
# Custom tests need Chrome. (They run in linux-custom_package_tests)
1010

11-
dart pub global run flutter_plugin_tools custom-test \
11+
dart ./script/tool/bin/flutter_plugin_tools.dart custom-test \
1212
--packages-for-branch --log-timing \
1313
--exclude=script/configs/linux_only_custom_test.yaml

.ci/scripts/dart_unit_tests_win32.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
# Use of this source code is governed by a BSD-style license that can be
44
# found in the LICENSE file.
55

6-
dart pub global run flutter_plugin_tools test --exclude=script/configs/windows_unit_tests_exceptions.yaml \
6+
dart ./script/tool/bin/flutter_plugin_tools.dart test \
7+
--exclude=script/configs/windows_unit_tests_exceptions.yaml \
78
--packages-for-branch --log-timing

.ci/scripts/drive_examples_win32.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
# Use of this source code is governed by a BSD-style license that can be
44
# found in the LICENSE file.
55

6-
dart pub global run flutter_plugin_tools drive-examples --windows \
6+
dart ./script/tool/bin/flutter_plugin_tools.dart drive-examples --windows \
77
--exclude=script/configs/exclude_integration_win32.yaml --packages-for-branch --log-timing

.ci/scripts/native_test_win32.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
# Use of this source code is governed by a BSD-style license that can be
44
# found in the LICENSE file.
55

6-
dart pub global run flutter_plugin_tools native-test --windows \
6+
dart ./script/tool/bin/flutter_plugin_tools.dart native-test --windows \
77
--no-integration --packages-for-branch --log-timing

.ci/scripts/prepare_tool.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@
66
# To set FETCH_HEAD for "git merge-base" to work
77
git fetch origin main
88

9-
# Pinned version of the plugin tools, to avoid breakage in this repository
10-
# when pushing updates from flutter/plugins.
11-
dart pub global activate flutter_plugin_tools 0.13.4+2
9+
cd script/tool
10+
dart pub get

.cirrus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ gcp_credentials: ENCRYPTED[!3a93d98d7c95a41f5033834ef30e50928fc5d81239dc632b153c
44
only_if: $CIRRUS_TAG == '' && ($CIRRUS_PR != '' || $CIRRUS_BRANCH == 'main')
55
env:
66
CHANNEL: "master" # Default to master when not explicitly set by a task.
7-
PLUGIN_TOOL_COMMAND: "dart pub global run flutter_plugin_tools"
7+
PLUGIN_TOOL_COMMAND: "dart ./script/tool/bin/flutter_plugin_tools.dart"
88

99
install_chrome_linux_template: &INSTALL_CHROME_LINUX
1010
env:

.github/workflows/release.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ jobs:
3131
with:
3232
fetch-depth: 0 # Fetch all history so the tool can get all the tags to determine version.
3333
- name: Set up tools
34-
run: dart pub global activate flutter_plugin_tools 0.13.4+2
34+
run: dart pub get
35+
working-directory: ${{ github.workspace }}/script/tool
3536

36-
# # This workflow should be the last to run. So wait for all the other tests to succeed.
37+
# This workflow should be the last to run. So wait for all the other tests to succeed.
3738
- name: Wait on all tests
3839
uses: lewagon/wait-on-check-action@3a563271c3f8d1611ed7352809303617ee7e54ac
3940
with:
@@ -42,11 +43,12 @@ jobs:
4243
repo-token: ${{ secrets.GITHUB_TOKEN }}
4344
wait-interval: 180 # seconds
4445
allowed-conclusions: success,neutral
46+
# verbose:true will produce too many logs that hang github actions web UI.
47+
verbose: false
4548

4649
- name: run release
4750
run: |
4851
git config --global user.name ${{ secrets.USER_NAME }}
4952
git config --global user.email ${{ secrets.USER_EMAIL }}
50-
dart pub global run flutter_plugin_tools publish --all-changed --base-sha=HEAD~ --skip-confirmation --remote=origin
53+
dart ./script/tool/lib/src/main.dart publish --all-changed --base-sha=HEAD~ --skip-confirmation --remote=origin
5154
env: {PUB_CREDENTIALS: "${{ secrets.PUB_CREDENTIALS }}"}
52-

script/tool_runner.sh

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,22 @@
22
# Copyright 2013 The Flutter Authors. All rights reserved.
33
# Use of this source code is governed by a BSD-style license that can be
44
# found in the LICENSE file.
5+
56
set -e
67

7-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
8-
REPO_DIR="$(dirname "$SCRIPT_DIR")"
8+
# WARNING! Do not remove this script, or change its behavior, unless you have
9+
# verified that it will not break the flutter/flutter analysis run of this
10+
# repository: https://github.com/flutter/flutter/blob/master/dev/bots/test.dart
11+
12+
readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
13+
readonly REPO_DIR="$(dirname "$SCRIPT_DIR")"
14+
readonly TOOL_PATH="$REPO_DIR/script/tool/bin/flutter_plugin_tools.dart"
15+
16+
# Ensure that the tool dependencies have been fetched.
17+
(pushd "$REPO_DIR/script/tool" && dart pub get && popd) >/dev/null
918

1019
# The tool expects to be run from the repo root.
11-
# PACKAGE_SHARDING is (optionally) set from Cirrus. See .cirrus.yml
1220
cd "$REPO_DIR"
13-
dart pub global run flutter_plugin_tools "$@" \
14-
--packages-for-branch \
15-
--log-timing \
16-
$PACKAGE_SHARDING
21+
# Run from the in-tree source.
22+
# PACKAGE_SHARDING is (optionally) set from Cirrus. See .cirrus.yml
23+
dart run "$TOOL_PATH" "$@" --packages-for-branch --log-timing $PACKAGE_SHARDING

0 commit comments

Comments
 (0)