Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Unified Diff: utils/compiler/create_snapshot.dart

Issue 22393002: First CL for removing our dependency on the checked-in binary for building (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/utils.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/compiler/create_snapshot.dart
diff --git a/utils/compiler/create_snapshot.dart b/utils/compiler/create_snapshot.dart
index e48900fa9073a925a169df1b0d4dcbed2cacbf9a..5e429bd29dd56e0b8d08feca8108ed0cc3074ff1 100644
--- a/utils/compiler/create_snapshot.dart
+++ b/utils/compiler/create_snapshot.dart
@@ -5,19 +5,15 @@
import 'dart:io';
Future<String> getVersion(var options, var rootPath) {
- var os = Platform.operatingSystem;
- var suffix = os == 'windows' ? '.exe' : '';
- var checkedInBinary =
- rootPath.join(new Path('tools/testing/bin/$os/dart$suffix'));
- var versionPath = rootPath.append("tools").append("version.dart");
- return Process.run(checkedInBinary.toNativePath(),
- [versionPath.toNativePath()])
- .then((result) {
- if (result.exitCode != 0) {
- throw "Could not generate version";
- }
- return result.stdout.trim();
- });
+ var suffix = Platform.operatingSystem == 'windows' ? '.exe' : '';
+ var printVersionScript =
+ rootPath.append("tools").append("print_version.py").toNativePath();
+ return Process.run("python$suffix", [printVersionScript]).then((result) {
+ if (result.exitCode != 0) {
+ throw "Could not generate version";
+ }
+ return result.stdout.trim();
+ });
}
Future<String> getSnapshotGenerationFile(var options, var args, var rootPath) {
« no previous file with comments | « tools/utils.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698