Unverified Commit 2c1536a2 authored by godofredoc's avatar godofredoc Committed by GitHub

Create a main alias for master channel. (#115388)

* Create a main alias for master channel.

To slowly migrate away from master branch in the flutter repository we
created a main branch that is mirroring master branch. This PR is also
adding a channel alias that will allow to use master/main interchangeably.

Bug: https://github.com/flutter/flutter/issues/95041

* Fix channel tests.

* Remove additional space.
parent 93c4b09e
......@@ -83,6 +83,7 @@ class _DefaultPersistentToolState implements PersistentToolState {
static const String _kRedisplayWelcomeMessage = 'redisplay-welcome-message';
static const Map<Channel, String> _lastActiveVersionKeys = <Channel,String>{
Channel.master: 'last-active-master-version',
Channel.main: 'last-active-main-version',
Channel.beta: 'last-active-beta-version',
Channel.stable: 'last-active-stable-version',
};
......
......@@ -32,8 +32,8 @@ const Map<String, String> kObsoleteBranches = <String, String>{
/// The names of each channel/branch in order of increasing stability.
enum Channel {
// TODO(fujino): update to main https://github.com/flutter/flutter/issues/95041
master,
main,
beta,
stable,
}
......@@ -41,6 +41,7 @@ enum Channel {
// Beware: Keep order in accordance with stability
const Set<String> kOfficialChannels = <String>{
globals.kDefaultFrameworkChannel,
'main',
'beta',
'stable',
};
......
......@@ -67,6 +67,7 @@ void main() {
command: <String>['git', 'branch', '-r'],
stdout: 'origin/beta\n'
'origin/master\n'
'origin/main\n'
'origin/stable\n',
),
);
......@@ -90,6 +91,7 @@ void main() {
stdout: 'origin/beta\n'
'origin/master\n'
'origin/dependabot/bundler\n'
'origin/main\n'
'origin/v1.4.5-hotfixes\n'
'origin/stable\n',
),
......
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