Commit 4ea8f302 authored by Adam Barth's avatar Adam Barth Committed by GitHub

Teach flutter upgrade to switch to master (#5827)

To avoid orphaning people on the deprecated alpha branch, this patch teaches
`flutter upgrade` to switch to the master branch.
parent e2070ba3
......@@ -33,6 +33,14 @@ class UpgradeCommand extends FlutterCommand {
return 1;
}
FlutterVersion version = new FlutterVersion(Cache.flutterRoot);
if (version.channel == 'alpha') {
// The alpha branch is deprecated. Rather than trying to pull the alpha
// branch, we should switch upstream to master.
printStatus('Switching to from alpha to master...');
runSync(<String>['git', 'branch', '--set-upstream-to=origin/master']);
}
printStatus('Upgrading Flutter from ${Cache.flutterRoot}...');
int code = await runCommandAndStreamOutput(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment