Fetch from origin before trying to switch channels (#4053)
diff --git a/.cirrus.yml b/.cirrus.yml
index 91a6562..210a98b 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -15,6 +15,11 @@
flutter_upgrade_template: &FLUTTER_UPGRADE_TEMPLATE
upgrade_flutter_script:
+ # 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.
- flutter channel $CHANNEL
- flutter upgrade
<< : *TOOL_SETUP_TEMPLATE