Commit f5f9440a authored by Chinmay Garde's avatar Chinmay Garde

Download the Xcode artifacts for the current engine revision

parent d7d4a46d
...@@ -9,6 +9,7 @@ import "package:path/path.dart" as path; ...@@ -9,6 +9,7 @@ import "package:path/path.dart" as path;
import "../runner/flutter_command_runner.dart"; import "../runner/flutter_command_runner.dart";
import "../runner/flutter_command.dart"; import "../runner/flutter_command.dart";
import "../artifacts.dart";
class IOSCommand extends FlutterCommand { class IOSCommand extends FlutterCommand {
final String name = "ios"; final String name = "ios";
...@@ -22,17 +23,17 @@ class IOSCommand extends FlutterCommand { ...@@ -22,17 +23,17 @@ class IOSCommand extends FlutterCommand {
} }
static Uri _xcodeProjectUri(String revision) { static Uri _xcodeProjectUri(String revision) {
return Uri.parse("https://storage.googleapis.com/flutter_infra/flutter/$revision/ios/FlutterXcode.zip"); String uriString = "https://storage.googleapis.com/flutter_infra/flutter/$revision/ios/FlutterXcode.zip";
print("Downloading $uriString ...");
return Uri.parse(uriString);
} }
Future<List<int>> _fetchXcodeArchive() async { Future<List<int>> _fetchXcodeArchive() async {
print("Fetching the Xcode project archive from the cloud..."); print("Fetching the Xcode project archive from the cloud...");
HttpClient client = new HttpClient(); HttpClient client = new HttpClient();
// TODO(chinmaygarde): Currently, engine releases are not tied to the release of the Xcode project
// archive. So use a "Current" tag. This will need to be replaced once releases HttpClientRequest request = await client.getUrl(_xcodeProjectUri(ArtifactStore.engineRevision));
// are in lockstep with the engine
HttpClientRequest request = await client.getUrl(_xcodeProjectUri("Current"));
HttpClientResponse response = await request.close(); HttpClientResponse response = await request.close();
if (response.statusCode != 200) if (response.statusCode != 200)
......
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