Update repo tooling (#344)

Updates to better align with the current flutter/plugins tooling:
- Pulls the latest flutter_plugin_tools
- Enables the new version-check functionality
- Enables the new license-check functionality
- Switches over to the new publish check functionality
- Moves format checking to a bot that does several of the very fast
  checks, leaving tests as their own bot
- Switches incremental_build.sh to use the new --run-on-changed-packages
  functionality instead of the bash check_changed_packages
- Moves check_changed_packages into local_tests.sh to minimize the
  chances of future new code trying to use it, as it is now legacy.
- Renames incremental_build.sh to tool_runner.sh, to better match its
  current behavior/use
This commit is contained in:
stuartmorgan
2021-05-10 13:48:16 -04:00
committed by GitHub
parent b17875fa0e
commit 4804697bf2
7 changed files with 73 additions and 129 deletions

22
script/tool_runner.sh Executable file
View File

@ -0,0 +1,22 @@
#!/bin/bash
# Copyright 2013 The Flutter Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
REPO_DIR="$(dirname "$SCRIPT_DIR")"
# Set some default actions if run without arguments.
ACTIONS=("$@")
if [[ "${#ACTIONS[@]}" == 0 ]]; then
ACTIONS=("test" "analyze" "java-test")
fi
BRANCH_NAME="${BRANCH_NAME:-"$(git rev-parse --abbrev-ref HEAD)"}"
if [[ "${BRANCH_NAME}" == "master" ]]; then
echo "Running for all packages"
(cd "$REPO_DIR" && pub global run flutter_plugin_tools "${ACTIONS[@]}" $BUILD_SHARDING)
else
(cd "$REPO_DIR" && pub global run flutter_plugin_tools "${ACTIONS[@]}" --run-on-changed-packages $BUILD_SHARDING)
fi