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
326ed7d7
Unverified
Commit
326ed7d7
authored
Nov 23, 2021
by
Alex
Committed by
GitHub
Nov 23, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[conductor] add global constants and startContext checkoutpath getter (#93877)
parent
57d1d7be
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
288 additions
and
90 deletions
+288
-90
globals.dart
dev/conductor/core/lib/src/globals.dart
+2
-0
start.dart
dev/conductor/core/lib/src/start.dart
+41
-41
start_test.dart
dev/conductor/core/test/start_test.dart
+245
-49
No files found.
dev/conductor/core/lib/src/globals.dart
View file @
326ed7d7
...
...
@@ -23,6 +23,8 @@ const String kReleaseDocumentationUrl = 'https://github.com/flutter/flutter/wiki
const
String
kLuciPackagingConsoleLink
=
'https://ci.chromium.org/p/flutter/g/packaging/console'
;
const
String
kWebsiteReleasesUrl
=
'https://docs.flutter.dev/development/tools/sdk/releases'
;
final
RegExp
releaseCandidateBranchRegex
=
RegExp
(
r'flutter-(\d+)\.(\d+)-candidate\.(\d+)'
,
);
...
...
dev/conductor/core/lib/src/start.dart
View file @
326ed7d7
...
...
@@ -53,8 +53,7 @@ class StartCommand extends Command<void> {
argParser
.
addOption
(
kFrameworkUpstreamOption
,
defaultsTo:
FrameworkRepository
.
defaultUpstream
,
help:
'Configurable Framework repo upstream remote. Primarily for testing.'
,
help:
'Configurable Framework repo upstream remote. Primarily for testing.'
,
hide:
true
,
);
argParser
.
addOption
(
...
...
@@ -233,12 +232,34 @@ class StartContext extends Context {
required
Checkouts
checkouts
,
required
File
stateFile
,
this
.
force
=
false
,
})
:
git
=
Git
(
processManager
),
super
(
checkouts:
checkouts
,
stateFile:
stateFile
,
);
})
:
git
=
Git
(
processManager
),
engine
=
EngineRepository
(
checkouts
,
initialRef:
candidateBranch
,
upstreamRemote:
Remote
(
name:
RemoteName
.
upstream
,
url:
engineUpstream
,
),
mirrorRemote:
Remote
(
name:
RemoteName
.
mirror
,
url:
engineMirror
,
),
),
framework
=
FrameworkRepository
(
checkouts
,
initialRef:
candidateBranch
,
upstreamRemote:
Remote
(
name:
RemoteName
.
upstream
,
url:
frameworkUpstream
,
),
mirrorRemote:
Remote
(
name:
RemoteName
.
mirror
,
url:
frameworkMirror
,
),
),
super
(
checkouts:
checkouts
,
stateFile:
stateFile
,
);
final
String
candidateBranch
;
final
String
?
dartRevision
;
...
...
@@ -257,10 +278,12 @@ class StartContext extends Context {
/// If validations should be overridden.
final
bool
force
;
final
EngineRepository
engine
;
final
FrameworkRepository
framework
;
Future
<
void
>
run
()
async
{
if
(
stateFile
.
existsSync
())
{
throw
ConductorException
(
'Error! A persistent state file already found at
${stateFile.path}
.
\n\n
'
throw
ConductorException
(
'Error! A persistent state file already found at
${stateFile.path}
.
\n\n
'
'Run `conductor clean` to cancel a previous release.'
);
}
if
(!
releaseCandidateBranchRegex
.
hasMatch
(
candidateBranch
))
{
...
...
@@ -278,19 +301,6 @@ class StartContext extends Context {
state
.
lastUpdatedDate
=
unixDate
;
state
.
incrementLevel
=
incrementLetter
;
final
EngineRepository
engine
=
EngineRepository
(
checkouts
,
initialRef:
candidateBranch
,
upstreamRemote:
Remote
(
name:
RemoteName
.
upstream
,
url:
engineUpstream
,
),
mirrorRemote:
Remote
(
name:
RemoteName
.
mirror
,
url:
engineMirror
,
),
);
// Create a new branch so that we don't accidentally push to upstream
// candidateBranch.
final
String
workingBranchName
=
'cherrypicks-
$candidateBranch
'
;
...
...
@@ -335,18 +345,7 @@ class StartContext extends Context {
upstream:
pb
.
Remote
(
name:
'upstream'
,
url:
engine
.
upstreamRemote
.
url
),
mirror:
pb
.
Remote
(
name:
'mirror'
,
url:
engine
.
mirrorRemote
!.
url
),
);
final
FrameworkRepository
framework
=
FrameworkRepository
(
checkouts
,
initialRef:
candidateBranch
,
upstreamRemote:
Remote
(
name:
RemoteName
.
upstream
,
url:
frameworkUpstream
,
),
mirrorRemote:
Remote
(
name:
RemoteName
.
mirror
,
url:
frameworkMirror
,
),
);
await
framework
.
newBranch
(
workingBranchName
);
final
List
<
pb
.
Cherrypick
>
frameworkCherrypicks
=
(
await
_sortCherrypicks
(
repository:
framework
,
...
...
@@ -374,8 +373,9 @@ class StartContext extends Context {
// Get framework version
final
Version
lastVersion
=
Version
.
fromString
(
await
framework
.
getFullTag
(
framework
.
upstreamRemote
.
name
,
candidateBranch
,
exact:
false
,
framework
.
upstreamRemote
.
name
,
candidateBranch
,
exact:
false
,
));
// [force] means we know this would fail but need to publish anyway
if
(!
force
)
{
...
...
@@ -421,10 +421,10 @@ class StartContext extends Context {
}
// This is the first stable release, so hardcode the z as 0
return
Version
(
x:
lastVersion
.
x
,
y:
lastVersion
.
y
,
z:
0
,
type:
VersionType
.
stable
,
x:
lastVersion
.
x
,
y:
lastVersion
.
y
,
z:
0
,
type:
VersionType
.
stable
,
);
}
return
Version
.
increment
(
lastVersion
,
incrementLetter
);
...
...
dev/conductor/core/test/start_test.dart
View file @
326ed7d7
This diff is collapsed.
Click to expand it.
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