From 8a711b9025ac855e72dc297d3138696bb89c8586 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Thu, 18 Oct 2018 14:45:38 -0700 Subject: [PATCH] update CI for non-flutter packages --- script/incremental_build.sh | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/script/incremental_build.sh b/script/incremental_build.sh index 283c9a550e..b314fb883e 100755 --- a/script/incremental_build.sh +++ b/script/incremental_build.sh @@ -13,17 +13,24 @@ if [[ "${#ACTIONS[@]}" == 0 ]]; then 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 + +if [[ "${BRANCH_NAME}" != "master" ]]; then # Sets CHANGED_PACKAGES check_changed_packages +fi - if [[ "$CHANGED_PACKAGES" == "" ]]; then - echo "Running for all packages" +if [[ "$CHANGED_PACKAGES" == "" ]]; then + echo "Running for all packages" + if [[ grep -q "flutter" "${REPO_DIR}/pubspec.yaml"]]; then (cd "$REPO_DIR" && pub global run flutter_plugin_tools "${ACTIONS[@]}" $BUILD_SHARDING) - else + else + (cd "$REPO_DIR" && dartanalyzer . && pub get && pub run test && pub publish --dry-run) + fi +else + echo "Running for ${CHANGED_PACKAGES}" + if [[ grep -q "flutter" "${REPO_DIR}/pubspec.yaml"]]; then (cd "$REPO_DIR" && pub global run flutter_plugin_tools "${ACTIONS[@]}" --plugins="$CHANGED_PACKAGES" $BUILD_SHARDING) + else + (cd "$REPO_DIR" && dartanalyzer . && pub get && pub run test && pub publish --dry-run) fi fi