Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 31ba457

Browse files
Simplify tool_runner.sh
1 parent 7c74f7d commit 31ba457

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

script/tool_runner.sh

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,18 @@
55

66
set -e
77

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+
812
readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
913
readonly REPO_DIR="$(dirname "$SCRIPT_DIR")"
14+
readonly TOOL_PATH="$REPO_DIR/script/tool/bin/flutter_plugin_tools.dart"
1015

11-
# Runs the plugin tools from the in-tree source.
12-
function plugin_tools() {
13-
(pushd "$REPO_DIR/script/tool" && dart pub get && popd) >/dev/null
14-
dart run "$REPO_DIR/script/tool/bin/flutter_plugin_tools.dart" "$@"
15-
}
16-
17-
ACTIONS=("$@")
18-
19-
# This has to be turned into a list and then split out to the command line,
20-
# otherwise it gets treated as a single argument.
21-
PLUGIN_SHARDING=($PLUGIN_SHARDING)
16+
# Ensure that the tool dependencies have been fetched.
17+
(pushd "$REPO_DIR/script/tool" && dart pub get && popd) >/dev/null
2218

23-
(cd "$REPO_DIR" && plugin_tools "${ACTIONS[@]}" --packages-for-branch ${PLUGIN_SHARDING[@]})
19+
# The tool expects to be run from the repo root.
20+
cd "$REPO_DIR"
21+
# Run from the in-tree source.
22+
dart run "$TOOL_PATH" "$@" --packages-for-branch $PLUGIN_SHARDING

0 commit comments

Comments
 (0)