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
4288937a
Unverified
Commit
4288937a
authored
Aug 20, 2021
by
Christopher Fujino
Committed by
GitHub
Aug 20, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_conductor] Push correct revision to mirror remote from conductor (#88607)
parent
8fe859fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
32 deletions
+5
-32
next.dart
dev/conductor/lib/next.dart
+2
-5
next_test.dart
dev/conductor/test/next_test.dart
+3
-27
No files found.
dev/conductor/lib/next.dart
View file @
4288937a
...
...
@@ -105,8 +105,6 @@ void runNext({
upstreamRemote:
upstream
,
previousCheckoutLocation:
state
.
engine
.
checkoutPath
,
);
final
String
headRevision
=
engine
.
reverseParse
(
'HEAD'
);
// check if the candidate branch is enabled in .ci.yaml
if
(!
engine
.
ciYaml
.
enabledBranches
.
contains
(
state
.
engine
.
candidateBranch
))
{
engine
.
ciYaml
.
enableBranch
(
state
.
engine
.
candidateBranch
);
...
...
@@ -157,7 +155,7 @@ void runNext({
}
engine
.
pushRef
(
fromRef:
headRevision
,
fromRef:
'HEAD'
,
// Explicitly create new branch
toRef:
'refs/heads/
${state.engine.workingBranch}
'
,
remote:
state
.
engine
.
mirror
.
name
,
...
...
@@ -221,7 +219,6 @@ void runNext({
upstreamRemote:
upstream
,
previousCheckoutLocation:
state
.
framework
.
checkoutPath
,
);
final
String
headRevision
=
framework
.
reverseParse
(
'HEAD'
);
// Check if the current candidate branch is enabled
if
(!
framework
.
ciYaml
.
enabledBranches
.
contains
(
state
.
framework
.
candidateBranch
))
{
...
...
@@ -290,7 +287,7 @@ void runNext({
}
framework
.
pushRef
(
fromRef:
headRevision
,
fromRef:
'HEAD'
,
// Explicitly create new branch
toRef:
'refs/heads/
${state.framework.workingBranch}
'
,
remote:
state
.
framework
.
mirror
.
name
,
...
...
dev/conductor/test/next_test.dart
View file @
4288937a
...
...
@@ -84,10 +84,6 @@ void main() {
const
FakeCommand
(
command:
<
String
>[
'git'
,
'checkout'
,
workingBranch
],
),
const
FakeCommand
(
command:
<
String
>[
'git'
,
'rev-parse'
,
'HEAD'
],
stdout:
revision1
,
),
]);
final
FakePlatform
platform
=
FakePlatform
(
environment:
<
String
,
String
>{
...
...
@@ -149,10 +145,6 @@ void main() {
final
FakeProcessManager
processManager
=
FakeProcessManager
.
list
(<
FakeCommand
>[
const
FakeCommand
(
command:
<
String
>[
'git'
,
'fetch'
,
'upstream'
]),
const
FakeCommand
(
command:
<
String
>[
'git'
,
'checkout'
,
workingBranch
]),
const
FakeCommand
(
command:
<
String
>[
'git'
,
'rev-parse'
,
'HEAD'
],
stdout:
revision1
,
),
const
FakeCommand
(
command:
<
String
>[
'git'
,
'status'
,
'--porcelain'
],
stdout:
'MM blah'
,
...
...
@@ -233,10 +225,6 @@ void main() {
_initializeCiYamlFile
(
file
);
},
),
const
FakeCommand
(
command:
<
String
>[
'git'
,
'rev-parse'
,
'HEAD'
],
stdout:
revision1
,
),
const
FakeCommand
(
command:
<
String
>[
'git'
,
'status'
,
'--porcelain'
],
stdout:
'MM .ci.yaml'
,
...
...
@@ -247,7 +235,7 @@ void main() {
command:
<
String
>[
'git'
,
'rev-parse'
,
'HEAD'
],
stdout:
revision2
,
),
const
FakeCommand
(
command:
<
String
>[
'git'
,
'push'
,
'mirror'
,
'
$revision1
:refs/heads/
$workingBranch
'
]),
const
FakeCommand
(
command:
<
String
>[
'git'
,
'push'
,
'mirror'
,
'
HEAD
:refs/heads/
$workingBranch
'
]),
]);
final
FakePlatform
platform
=
FakePlatform
(
environment:
<
String
,
String
>{
...
...
@@ -533,10 +521,6 @@ void main() {
_initializeCiYamlFile
(
file
);
},
),
const
FakeCommand
(
command:
<
String
>[
'git'
,
'rev-parse'
,
'HEAD'
],
stdout:
revision2
,
),
const
FakeCommand
(
command:
<
String
>[
'git'
,
'status'
,
'--porcelain'
],
stdout:
'MM /path/to/.ci.yaml'
,
...
...
@@ -627,10 +611,6 @@ void main() {
),
const
FakeCommand
(
command:
<
String
>[
'git'
,
'fetch'
,
'upstream'
]),
const
FakeCommand
(
command:
<
String
>[
'git'
,
'checkout'
,
workingBranch
]),
const
FakeCommand
(
command:
<
String
>[
'git'
,
'rev-parse'
,
'HEAD'
],
stdout:
revision2
,
),
const
FakeCommand
(
command:
<
String
>[
'git'
,
'status'
,
'--porcelain'
],
stdout:
'MM path/to/.ci.yaml'
,
...
...
@@ -709,10 +689,6 @@ void main() {
_initializeCiYamlFile
(
file
);
},
),
const
FakeCommand
(
command:
<
String
>[
'git'
,
'rev-parse'
,
'HEAD'
],
stdout:
revision2
,
),
const
FakeCommand
(
command:
<
String
>[
'git'
,
'status'
,
'--porcelain'
],
stdout:
'MM path/to/.ci.yaml'
,
...
...
@@ -742,7 +718,7 @@ void main() {
stdout:
revision4
,
),
const
FakeCommand
(
command:
<
String
>[
'git'
,
'push'
,
'mirror'
,
'
$revision2
:refs/heads/
$workingBranch
'
],
command:
<
String
>[
'git'
,
'push'
,
'mirror'
,
'
HEAD
:refs/heads/
$workingBranch
'
],
),
]);
writeStateToFile
(
...
...
@@ -783,7 +759,7 @@ void main() {
);
expect
(
stdio
.
stdout
,
contains
(
'Executed command: `git push mirror
$revision2
:refs/heads/
$workingBranch
`'
),
contains
(
'Executed command: `git push mirror
HEAD
:refs/heads/
$workingBranch
`'
),
);
expect
(
stdio
.
error
,
isEmpty
);
});
...
...
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