[packaging] Move chromium mirror to flutter mirror (#104222)
This commit is contained in:
parent
4c66e304d1
commit
a79233cbba
@ -15,7 +15,8 @@ import 'package:path/path.dart' as path;
|
|||||||
import 'package:platform/platform.dart' show Platform, LocalPlatform;
|
import 'package:platform/platform.dart' show Platform, LocalPlatform;
|
||||||
import 'package:process/process.dart';
|
import 'package:process/process.dart';
|
||||||
|
|
||||||
const String chromiumRepo = 'https://chromium.googlesource.com/external/github.com/flutter/flutter';
|
const String gobMirror =
|
||||||
|
'https://flutter.googlesource.com/mirrors/flutter';
|
||||||
const String githubRepo = 'https://github.com/flutter/flutter.git';
|
const String githubRepo = 'https://github.com/flutter/flutter.git';
|
||||||
const String mingitForWindowsUrl = 'https://storage.googleapis.com/flutter_infra_release/mingit/'
|
const String mingitForWindowsUrl = 'https://storage.googleapis.com/flutter_infra_release/mingit/'
|
||||||
'603511c649b00bbef0a6122a827ac419b656bc19/mingit.zip';
|
'603511c649b00bbef0a6122a827ac419b656bc19/mingit.zip';
|
||||||
@ -424,7 +425,7 @@ class ArchiveCreator {
|
|||||||
// We want the user to start out the in the specified branch instead of a
|
// We want the user to start out the in the specified branch instead of a
|
||||||
// detached head. To do that, we need to make sure the branch points at the
|
// detached head. To do that, we need to make sure the branch points at the
|
||||||
// desired revision.
|
// desired revision.
|
||||||
await _runGit(<String>['clone', '-b', branchName, chromiumRepo], workingDirectory: tempDir);
|
await _runGit(<String>['clone', '-b', branchName, gobMirror], workingDirectory: tempDir);
|
||||||
await _runGit(<String>['reset', '--hard', revision]);
|
await _runGit(<String>['reset', '--hard', revision]);
|
||||||
|
|
||||||
// Make the origin point to github instead of the chromium mirror.
|
// Make the origin point to github instead of the chromium mirror.
|
||||||
|
@ -123,7 +123,7 @@ void main() {
|
|||||||
'flutter_${platformName}_v1.2.3-dev${platform.isLinux ? '.tar.xz' : '.zip'}');
|
'flutter_${platformName}_v1.2.3-dev${platform.isLinux ? '.tar.xz' : '.zip'}');
|
||||||
|
|
||||||
processManager.addCommands(convertResults(<String, List<ProcessResult>?>{
|
processManager.addCommands(convertResults(<String, List<ProcessResult>?>{
|
||||||
'git clone -b dev https://chromium.googlesource.com/external/github.com/flutter/flutter': null,
|
'git clone -b dev https://flutter.googlesource.com/mirrors/flutter': null,
|
||||||
'git reset --hard $testRef': null,
|
'git reset --hard $testRef': null,
|
||||||
'git remote set-url origin https://github.com/flutter/flutter.git': null,
|
'git remote set-url origin https://github.com/flutter/flutter.git': null,
|
||||||
'git describe --tags --exact-match $testRef': <ProcessResult>[ProcessResult(0, 0, 'v1.2.3', '')],
|
'git describe --tags --exact-match $testRef': <ProcessResult>[ProcessResult(0, 0, 'v1.2.3', '')],
|
||||||
@ -159,7 +159,7 @@ void main() {
|
|||||||
final String archiveName = path.join(tempDir.absolute.path,
|
final String archiveName = path.join(tempDir.absolute.path,
|
||||||
'flutter_${platformName}_v1.2.3-dev${platform.isLinux ? '.tar.xz' : '.zip'}');
|
'flutter_${platformName}_v1.2.3-dev${platform.isLinux ? '.tar.xz' : '.zip'}');
|
||||||
final Map<String, List<ProcessResult>?> calls = <String, List<ProcessResult>?>{
|
final Map<String, List<ProcessResult>?> calls = <String, List<ProcessResult>?>{
|
||||||
'git clone -b dev https://chromium.googlesource.com/external/github.com/flutter/flutter': null,
|
'git clone -b dev https://flutter.googlesource.com/mirrors/flutter': null,
|
||||||
'git reset --hard $testRef': null,
|
'git reset --hard $testRef': null,
|
||||||
'git remote set-url origin https://github.com/flutter/flutter.git': null,
|
'git remote set-url origin https://github.com/flutter/flutter.git': null,
|
||||||
'git describe --tags --exact-match $testRef': <ProcessResult>[ProcessResult(0, 0, 'v1.2.3', '')],
|
'git describe --tags --exact-match $testRef': <ProcessResult>[ProcessResult(0, 0, 'v1.2.3', '')],
|
||||||
@ -206,7 +206,7 @@ void main() {
|
|||||||
final String archiveName = path.join(tempDir.absolute.path,
|
final String archiveName = path.join(tempDir.absolute.path,
|
||||||
'flutter_${platformName}_arm64_v1.2.3-dev${platform.isLinux ? '.tar.xz' : '.zip'}');
|
'flutter_${platformName}_arm64_v1.2.3-dev${platform.isLinux ? '.tar.xz' : '.zip'}');
|
||||||
final Map<String, List<ProcessResult>?> calls = <String, List<ProcessResult>?>{
|
final Map<String, List<ProcessResult>?> calls = <String, List<ProcessResult>?>{
|
||||||
'git clone -b dev https://chromium.googlesource.com/external/github.com/flutter/flutter': null,
|
'git clone -b dev https://flutter.googlesource.com/mirrors/flutter': null,
|
||||||
'git reset --hard $testRef': null,
|
'git reset --hard $testRef': null,
|
||||||
'git remote set-url origin https://github.com/flutter/flutter.git': null,
|
'git remote set-url origin https://github.com/flutter/flutter.git': null,
|
||||||
'git describe --tags --exact-match $testRef': <ProcessResult>[ProcessResult(0, 0, 'v1.2.3', '')],
|
'git describe --tags --exact-match $testRef': <ProcessResult>[ProcessResult(0, 0, 'v1.2.3', '')],
|
||||||
@ -250,7 +250,7 @@ void main() {
|
|||||||
|
|
||||||
test('throws when a command errors out', () async {
|
test('throws when a command errors out', () async {
|
||||||
final Map<String, List<ProcessResult>> calls = <String, List<ProcessResult>>{
|
final Map<String, List<ProcessResult>> calls = <String, List<ProcessResult>>{
|
||||||
'git clone -b dev https://chromium.googlesource.com/external/github.com/flutter/flutter':
|
'git clone -b dev https://flutter.googlesource.com/mirrors/flutter':
|
||||||
<ProcessResult>[ProcessResult(0, 0, 'output1', '')],
|
<ProcessResult>[ProcessResult(0, 0, 'output1', '')],
|
||||||
'git reset --hard $testRef': <ProcessResult>[ProcessResult(0, -1, 'output2', '')],
|
'git reset --hard $testRef': <ProcessResult>[ProcessResult(0, -1, 'output2', '')],
|
||||||
};
|
};
|
||||||
@ -263,7 +263,7 @@ void main() {
|
|||||||
final String archiveName = path.join(tempDir.absolute.path,
|
final String archiveName = path.join(tempDir.absolute.path,
|
||||||
'flutter_${platformName}_v1.2.3-dev${platform.isLinux ? '.tar.xz' : '.zip'}');
|
'flutter_${platformName}_v1.2.3-dev${platform.isLinux ? '.tar.xz' : '.zip'}');
|
||||||
final Map<String, List<ProcessResult>?> calls = <String, List<ProcessResult>?>{
|
final Map<String, List<ProcessResult>?> calls = <String, List<ProcessResult>?>{
|
||||||
'git clone -b dev https://chromium.googlesource.com/external/github.com/flutter/flutter': null,
|
'git clone -b dev https://flutter.googlesource.com/mirrors/flutter': null,
|
||||||
'git reset --hard $testRef': null,
|
'git reset --hard $testRef': null,
|
||||||
'git remote set-url origin https://github.com/flutter/flutter.git': null,
|
'git remote set-url origin https://github.com/flutter/flutter.git': null,
|
||||||
'git describe --tags --abbrev=0 $testRef': <ProcessResult>[ProcessResult(0, 0, 'v1.2.3', '')],
|
'git describe --tags --abbrev=0 $testRef': <ProcessResult>[ProcessResult(0, 0, 'v1.2.3', '')],
|
||||||
@ -312,7 +312,7 @@ void main() {
|
|||||||
final ProcessResult codesignFailure = ProcessResult(1, 1, '', 'code object is not signed at all');
|
final ProcessResult codesignFailure = ProcessResult(1, 1, '', 'code object is not signed at all');
|
||||||
final String binPath = path.join(tempDir.path, 'flutter', 'bin', 'cache', 'dart-sdk', 'bin', 'dart');
|
final String binPath = path.join(tempDir.path, 'flutter', 'bin', 'cache', 'dart-sdk', 'bin', 'dart');
|
||||||
final Map<String, List<ProcessResult>?> calls = <String, List<ProcessResult>?>{
|
final Map<String, List<ProcessResult>?> calls = <String, List<ProcessResult>?>{
|
||||||
'git clone -b dev https://chromium.googlesource.com/external/github.com/flutter/flutter': null,
|
'git clone -b dev https://flutter.googlesource.com/mirrors/flutter': null,
|
||||||
'git reset --hard $testRef': null,
|
'git reset --hard $testRef': null,
|
||||||
'git remote set-url origin https://github.com/flutter/flutter.git': null,
|
'git remote set-url origin https://github.com/flutter/flutter.git': null,
|
||||||
'git describe --tags --exact-match $testRef': <ProcessResult>[ProcessResult(0, 0, 'v1.2.3', '')],
|
'git describe --tags --exact-match $testRef': <ProcessResult>[ProcessResult(0, 0, 'v1.2.3', '')],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user