Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ task:
- name: build-apks+java-test+firebase-test-lab
env:
matrix:
PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2"
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2"
PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4"
PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4"
PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4"
PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4"
matrix:
CHANNEL: "master"
CHANNEL: "stable"
Expand Down
11 changes: 8 additions & 3 deletions script/incremental_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,25 @@ elif [[ "${ACTIONS[@]}" == "analyze" ]]; then
fi

BRANCH_NAME="${BRANCH_NAME:-"$(git rev-parse --abbrev-ref HEAD)"}"

# This has to be turned into a list and then split out to the command line,
# otherwise it gets treated as a single argument.
PLUGIN_SHARDING=($PLUGIN_SHARDING)

if [[ "${BRANCH_NAME}" == "master" ]]; then
echo "Running for all packages"
(cd "$REPO_DIR" && pub global run flutter_plugin_tools "${ACTIONS[@]}" $PLUGIN_SHARDING)
(cd "$REPO_DIR" && pub global run flutter_plugin_tools "${ACTIONS[@]}" ${PLUGIN_SHARDING[@]})
else
# Sets CHANGED_PACKAGES
check_changed_packages

if [[ "$CHANGED_PACKAGES" == "" ]]; then
echo "No changes detected in packages."
echo "Running for all packages"
(cd "$REPO_DIR" && pub global run flutter_plugin_tools "${ACTIONS[@]}" $PLUGIN_SHARDING)
(cd "$REPO_DIR" && pub global run flutter_plugin_tools "${ACTIONS[@]}" ${PLUGIN_SHARDING[@]})
else
echo running "${ACTIONS[@]}"
(cd "$REPO_DIR" && pub global run flutter_plugin_tools "${ACTIONS[@]}" --plugins="$CHANGED_PACKAGES" $PLUGIN_SHARDING)
(cd "$REPO_DIR" && pub global run flutter_plugin_tools "${ACTIONS[@]}" --plugins="$CHANGED_PACKAGES" ${PLUGIN_SHARDING[@]})
echo "Running version check for changed packages"
(cd "$REPO_DIR" && pub global run flutter_plugin_tools version-check --base_sha="$(get_branch_base_sha)")
fi
Expand Down