diff --git a/tools/clone_flutter.sh b/tools/clone_flutter.sh index 884de99df4117..8bf7c6e609a26 100755 --- a/tools/clone_flutter.sh +++ b/tools/clone_flutter.sh @@ -17,8 +17,18 @@ fi # Go to the engine git repo to get the date of the latest commit. cd $ENGINE_PATH/src/flutter -# Special handling of release branches. +# Special handling of release branches. We would like to run the tests against +# the release branch of flutter. +# +# On presubmit, we can get the branch name from the `CIRRUS_BASE_BRANCH` flag. +# During the commit tests the base branch value is empty, instead +# `CIRRUS_BRANCH` has the correct branch name. ENGINE_BRANCH_NAME=$CIRRUS_BASE_BRANCH +if [[ -z $CIRRUS_BASE_BRANCH ]] +then + echo "Running post commit tests use CIRRUS_BRANCH instead." + ENGINE_BRANCH_NAME=$CIRRUS_BRANCH +fi versionregex="^v[[:digit:]]+\." releasecandidateregex="^flutter-[[:digit:]]+\.[[:digit:]]+-candidate\.[[:digit:]]+$" ON_RELEASE_BRANCH=false