Files
packages/script/tool_runner.sh
stuartmorgan 4804697bf2 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
2021-05-10 10:48:16 -07:00

23 lines
797 B
Bash
Executable File

#!/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