Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
ad470f6b
Unverified
Commit
ad470f6b
authored
Dec 01, 2021
by
Alex
Committed by
GitHub
Dec 01, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[conductor] channel constants refactor (#94220)
parent
ed8468b9
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
17 deletions
+14
-17
globals.dart
dev/conductor/core/lib/src/globals.dart
+9
-12
start.dart
dev/conductor/core/lib/src/start.dart
+2
-2
state.dart
dev/conductor/core/lib/src/state.dart
+1
-1
version.dart
dev/conductor/core/lib/src/version.dart
+2
-2
No files found.
dev/conductor/core/lib/src/globals.dart
View file @
ad470f6b
...
...
@@ -12,12 +12,11 @@ const String gsutilBinary = 'gsutil.py';
const
String
kFrameworkDefaultBranch
=
'master'
;
const
String
kForceFlag
=
'force'
;
const
List
<
String
>
kReleaseChannels
=
<
String
>[
'stable'
,
'beta'
,
'dev'
,
FrameworkRepository
.
defaultBranch
,
];
const
List
<
String
>
kBaseReleaseChannels
=
<
String
>[
'stable'
,
'beta'
,
'dev'
];
const
List
<
String
>
kReleaseChannels
=
<
String
>[...
kBaseReleaseChannels
,
FrameworkRepository
.
defaultBranch
];
const
List
<
String
>
KReleaseIncrements
=
<
String
>[
'y'
,
'z'
,
'm'
,
'n'
];
const
String
kReleaseDocumentationUrl
=
'https://github.com/flutter/flutter/wiki/Flutter-Cherrypick-Process'
;
...
...
@@ -80,8 +79,7 @@ String? getValueFromEnvOrArgs(
if
(
allowNull
)
{
return
null
;
}
throw
ConductorException
(
'Expected either the CLI arg --
$name
or the environment variable
$envName
'
throw
ConductorException
(
'Expected either the CLI arg --
$name
or the environment variable
$envName
'
'to be provided!'
);
}
...
...
@@ -120,8 +118,7 @@ List<String> getValuesFromEnvOrArgs(
return
argValues
;
}
throw
ConductorException
(
'Expected either the CLI arg --
$name
or the environment variable
$envName
'
throw
ConductorException
(
'Expected either the CLI arg --
$name
or the environment variable
$envName
'
'to be provided!'
);
}
...
...
dev/conductor/core/lib/src/start.dart
View file @
ad470f6b
...
...
@@ -48,7 +48,7 @@ class StartCommand extends Command<void> {
argParser
.
addOption
(
kReleaseOption
,
help:
'The target release channel for the release.'
,
allowed:
<
String
>[
'stable'
,
'beta'
,
'dev'
]
,
allowed:
kBaseReleaseChannels
,
);
argParser
.
addOption
(
kFrameworkUpstreamOption
,
...
...
@@ -93,7 +93,7 @@ class StartCommand extends Command<void> {
kIncrementOption
,
help:
'Specifies which part of the x.y.z version number to increment. Required.'
,
valueHelp:
'level'
,
allowed:
<
String
>[
'y'
,
'z'
,
'm'
,
'n'
]
,
allowed:
KReleaseIncrements
,
allowedHelp:
<
String
,
String
>{
'y'
:
'Indicates the first dev release after a beta release.'
,
'z'
:
'Indicates a hotfix to a stable release.'
,
...
...
dev/conductor/core/lib/src/state.dart
View file @
ad470f6b
...
...
@@ -15,7 +15,7 @@ const String kStateFileName = '.flutter_conductor_state.json';
String
luciConsoleLink
(
String
channel
,
String
groupName
)
{
assert
(
<
String
>[
'stable'
,
'beta'
,
'dev'
,
'master'
]
.
contains
(
channel
),
kReleaseChannels
.
contains
(
channel
),
'channel
$channel
not recognized'
,
);
assert
(
...
...
dev/conductor/core/lib/src/version.dart
View file @
ad470f6b
...
...
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'./globals.dart'
show
releaseCandidateBranchRegex
,
ConductorException
;
import
'./globals.dart'
show
ConductorException
,
KReleaseIncrements
,
releaseCandidateBranchRegex
;
/// Possible string formats that `flutter --version` can return.
enum
VersionType
{
...
...
@@ -262,7 +262,7 @@ class Version {
/// Will throw a [ConductorException] if the version is not possible given the
/// [candidateBranch] and [incrementLetter].
void
ensureValid
(
String
candidateBranch
,
String
incrementLetter
)
{
if
(!
const
<
String
>{
'y'
,
'z'
,
'm'
,
'n'
}
.
contains
(
incrementLetter
))
{
if
(!
KReleaseIncrements
.
contains
(
incrementLetter
))
{
throw
ConductorException
(
'Invalid incrementLetter:
$incrementLetter
'
);
}
final
RegExpMatch
?
branchMatch
=
releaseCandidateBranchRegex
.
firstMatch
(
candidateBranch
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment