Unverified Commit 0adf9671 authored by Christopher Fujino's avatar Christopher Fujino Committed by GitHub

[flutter_conductor] clone from remote upstream, and not local filesystem (#100335)

parent a217bbb6
...@@ -73,9 +73,8 @@ class CodesignCommand extends Command<void> { ...@@ -73,9 +73,8 @@ class CodesignCommand extends Command<void> {
FrameworkRepository? _framework; FrameworkRepository? _framework;
FrameworkRepository get framework { FrameworkRepository get framework {
return _framework ??= FrameworkRepository.localRepoAsUpstream( return _framework ??= FrameworkRepository(
checkouts, checkouts,
upstreamPath: flutterRoot.path,
); );
} }
...@@ -113,7 +112,7 @@ class CodesignCommand extends Command<void> { ...@@ -113,7 +112,7 @@ class CodesignCommand extends Command<void> {
} else { } else {
revision = ((await processManager.run( revision = ((await processManager.run(
<String>['git', 'rev-parse', 'HEAD'], <String>['git', 'rev-parse', 'HEAD'],
workingDirectory: (await framework.checkoutDirectory).path, workingDirectory: flutterRoot.path,
)).stdout as String).trim(); )).stdout as String).trim();
assert(revision.isNotEmpty); assert(revision.isNotEmpty);
} }
......
...@@ -103,13 +103,18 @@ void main() { ...@@ -103,13 +103,18 @@ void main() {
); );
} }
createRunner(commands: <FakeCommand>[ createRunner(commands: <FakeCommand>[
const FakeCommand(command: <String>[
'git',
'rev-parse',
'HEAD',
], stdout: revision),
const FakeCommand(command: <String>[ const FakeCommand(command: <String>[
'git', 'git',
'clone', 'clone',
'--origin', '--origin',
'upstream', 'upstream',
'--', '--',
'file://$flutterRoot/', FrameworkRepository.defaultUpstream,
'${checkoutsParentDirectory}flutter_conductor_checkouts/framework', '${checkoutsParentDirectory}flutter_conductor_checkouts/framework',
]), ]),
const FakeCommand(command: <String>[ const FakeCommand(command: <String>[
...@@ -122,11 +127,6 @@ void main() { ...@@ -122,11 +127,6 @@ void main() {
'rev-parse', 'rev-parse',
'HEAD', 'HEAD',
], stdout: revision), ], stdout: revision),
const FakeCommand(command: <String>[
'git',
'rev-parse',
'HEAD',
], stdout: revision),
const FakeCommand(command: <String>[ const FakeCommand(command: <String>[
'git', 'git',
'checkout', 'checkout',
...@@ -198,7 +198,7 @@ void main() { ...@@ -198,7 +198,7 @@ void main() {
'--origin', '--origin',
'upstream', 'upstream',
'--', '--',
'file://$flutterRoot/', FrameworkRepository.defaultUpstream,
'${checkoutsParentDirectory}flutter_conductor_checkouts/framework', '${checkoutsParentDirectory}flutter_conductor_checkouts/framework',
]), ]),
const FakeCommand(command: <String>[ const FakeCommand(command: <String>[
...@@ -291,7 +291,7 @@ void main() { ...@@ -291,7 +291,7 @@ void main() {
'--origin', '--origin',
'upstream', 'upstream',
'--', '--',
'file://$flutterRoot/', FrameworkRepository.defaultUpstream,
'${checkoutsParentDirectory}flutter_conductor_checkouts/framework', '${checkoutsParentDirectory}flutter_conductor_checkouts/framework',
]), ]),
const FakeCommand(command: <String>[ const FakeCommand(command: <String>[
...@@ -383,7 +383,7 @@ void main() { ...@@ -383,7 +383,7 @@ void main() {
'--origin', '--origin',
'upstream', 'upstream',
'--', '--',
'file://$flutterRoot/', FrameworkRepository.defaultUpstream,
'${checkoutsParentDirectory}flutter_conductor_checkouts/framework', '${checkoutsParentDirectory}flutter_conductor_checkouts/framework',
]), ]),
const FakeCommand(command: <String>[ const FakeCommand(command: <String>[
...@@ -447,7 +447,7 @@ void main() { ...@@ -447,7 +447,7 @@ void main() {
'--origin', '--origin',
'upstream', 'upstream',
'--', '--',
'file://$flutterRoot/', FrameworkRepository.defaultUpstream,
'${checkoutsParentDirectory}flutter_conductor_checkouts/framework', '${checkoutsParentDirectory}flutter_conductor_checkouts/framework',
]), ]),
const FakeCommand(command: <String>[ const FakeCommand(command: <String>[
......
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