Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download the Xcode artifacts for the current engine revision #1093

Merged
merged 1 commit into from
Jan 6, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 6 additions & 5 deletions packages/flutter_tools/lib/src/commands/ios.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import "package:path/path.dart" as path;

import "../runner/flutter_command_runner.dart";
import "../runner/flutter_command.dart";
import "../artifacts.dart";

class IOSCommand extends FlutterCommand {
final String name = "ios";
Expand All @@ -22,17 +23,17 @@ class IOSCommand extends FlutterCommand {
}

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 {
print("Fetching the Xcode project archive from the cloud...");

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
// are in lockstep with the engine
HttpClientRequest request = await client.getUrl(_xcodeProjectUri("Current"));

HttpClientRequest request = await client.getUrl(_xcodeProjectUri(ArtifactStore.engineRevision));
HttpClientResponse response = await request.close();

if (response.statusCode != 200)
Expand Down