Skip to content

Commit c38b54e

Browse files
godofredocgspencergoog
authored andcommitted
Create a main alias for master channel. (flutter#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: flutter#95041 * Fix channel tests. * Remove additional space.
1 parent baf9953 commit c38b54e

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

packages/flutter_tools/lib/src/persistent_tool_state.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ class _DefaultPersistentToolState implements PersistentToolState {
8383
static const String _kRedisplayWelcomeMessage = 'redisplay-welcome-message';
8484
static const Map<Channel, String> _lastActiveVersionKeys = <Channel,String>{
8585
Channel.master: 'last-active-master-version',
86+
Channel.main: 'last-active-main-version',
8687
Channel.beta: 'last-active-beta-version',
8788
Channel.stable: 'last-active-stable-version',
8889
};

packages/flutter_tools/lib/src/version.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,16 @@ const Map<String, String> kObsoleteBranches = <String, String>{
3232

3333
/// The names of each channel/branch in order of increasing stability.
3434
enum Channel {
35-
// TODO(fujino): update to main https://github.com/flutter/flutter/issues/95041
3635
master,
36+
main,
3737
beta,
3838
stable,
3939
}
4040

4141
// Beware: Keep order in accordance with stability
4242
const Set<String> kOfficialChannels = <String>{
4343
globals.kDefaultFrameworkChannel,
44+
'main',
4445
'beta',
4546
'stable',
4647
};

packages/flutter_tools/test/general.shard/channel_test.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ void main() {
6767
command: <String>['git', 'branch', '-r'],
6868
stdout: 'origin/beta\n'
6969
'origin/master\n'
70+
'origin/main\n'
7071
'origin/stable\n',
7172
),
7273
);
@@ -90,6 +91,7 @@ void main() {
9091
stdout: 'origin/beta\n'
9192
'origin/master\n'
9293
'origin/dependabot/bundler\n'
94+
'origin/main\n'
9395
'origin/v1.4.5-hotfixes\n'
9496
'origin/stable\n',
9597
),

0 commit comments

Comments
 (0)