From ae0ab86373ce513f33eda13496dd62703a8b4d00 Mon Sep 17 00:00:00 2001 From: stuartmorgan Date: Wed, 4 Aug 2021 11:40:51 -0700 Subject: [PATCH] Don't use 'flutter upgrade' on Cirrus (#429) This command isn't intended for CI use, and is also slower due to downloading artifacts that will be immidately discarded. See flutter/flutter#86037 --- .cirrus.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 728559cb55..6300a56e10 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -12,9 +12,17 @@ tool_setup_template: &TOOL_SETUP_TEMPLATE flutter_upgrade_template: &FLUTTER_UPGRADE_TEMPLATE upgrade_flutter_script: - - flutter channel $CHANNEL - - flutter upgrade - - flutter doctor + # Ensure that the repository has all the branches. + - cd $FLUTTER_HOME + - git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" + - git fetch origin + # Switch to the requested branch. + - git checkout $CHANNEL + # Reset to upstream branch, rather than using pull, since the base image + # can sometimes be in a state where it has diverged from upstream (!). + - git reset --hard @{u} + # Run doctor to allow auditing of what version of Flutter the run is using. + - flutter doctor -v << : *TOOL_SETUP_TEMPLATE task: