Switch over to the Travis-built artifacts
We've been bulding these binaries using Travis for a while. We can start using them now.
This commit is contained in:
@@ -40,11 +40,7 @@ String _getNameForTargetPlatform(TargetPlatform platform) {
|
||||
// Keep in sync with https://github.com/flutter/engine/blob/master/sky/tools/release_engine.py
|
||||
// and https://github.com/flutter/buildbot/blob/master/travis/build.sh
|
||||
String _getCloudStorageBaseUrl({String platform, String revision}) {
|
||||
// In the fullness of time, we'll have a consistent URL pattern for all of
|
||||
// our artifacts, but, for the time being, Mac OS X artifacts are stored in a
|
||||
// different cloud storage bucket.
|
||||
String bucket = (platform == 'darwin-x64') ? "mojo_infra" : "mojo";
|
||||
return 'https://storage.googleapis.com/$bucket/flutter/$revision/$platform/';
|
||||
return 'https://storage.googleapis.com/mojo_infra/flutter/$revision/$platform/';
|
||||
}
|
||||
|
||||
enum ArtifactType {
|
||||
|
||||
@@ -88,31 +88,30 @@ class RunMojoCommand extends FlutterCommand {
|
||||
args.add(command);
|
||||
|
||||
BuildConfiguration config = _getCurrentHostConfig();
|
||||
final String appPath = _makePathAbsolute(bundlePath);
|
||||
|
||||
String flutterPath;
|
||||
if (config == null || config.type == BuildType.prebuilt) {
|
||||
TargetPlatform targetPlatform = argResults['android'] ? TargetPlatform.android : TargetPlatform.linux;
|
||||
Artifact artifact = ArtifactStore.getArtifact(type: ArtifactType.mojo, targetPlatform: targetPlatform);
|
||||
flutterPath = _makePathAbsolute(await ArtifactStore.getPath(artifact));
|
||||
} else {
|
||||
String localPath = path.join(config.buildDir, 'flutter.mojo');
|
||||
flutterPath = _makePathAbsolute(localPath);
|
||||
}
|
||||
|
||||
if (argResults['android']) {
|
||||
args.add('--android');
|
||||
final String appPath = _makePathAbsolute(bundlePath);
|
||||
final String appName = path.basename(appPath);
|
||||
final String appDir = path.dirname(appPath);
|
||||
args.add('http://app/$appName');
|
||||
args.add('--map-origin=http://app/=$appDir');
|
||||
if (config == null || config.type == BuildType.prebuilt) {
|
||||
final String cloudStorageBaseUrl = ArtifactStore.getCloudStorageBaseUrl('android-arm');
|
||||
args.add('--map-origin=http://flutter/=$cloudStorageBaseUrl');
|
||||
} else {
|
||||
args.add('--map-origin=http://flutter/=${config.buildDir}');
|
||||
}
|
||||
args.add('--url-mappings=mojo:flutter=http://flutter/flutter.mojo');
|
||||
|
||||
final String flutterName = path.basename(flutterPath);
|
||||
final String flutterDir = path.dirname(flutterPath);
|
||||
args.add('--map-origin=http://flutter/=$flutterDir');
|
||||
args.add('--url-mappings=mojo:flutter=http://flutter/$flutterName');
|
||||
} else {
|
||||
final String appPath = _makePathAbsolute(bundlePath);
|
||||
String flutterPath;
|
||||
if (config == null || config.type == BuildType.prebuilt) {
|
||||
Artifact artifact = ArtifactStore.getArtifact(type: ArtifactType.mojo, targetPlatform: TargetPlatform.linux);
|
||||
flutterPath = _makePathAbsolute(await ArtifactStore.getPath(artifact));
|
||||
} else {
|
||||
String localPath = path.join(config.buildDir, 'flutter.mojo');
|
||||
flutterPath = _makePathAbsolute(localPath);
|
||||
}
|
||||
args.add('file://$appPath');
|
||||
args.add('--url-mappings=mojo:flutter=file://$flutterPath');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user