OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 import 'dart:io'; | 5 import 'dart:io'; |
| 6 import 'dart:async'; |
6 | 7 |
7 Future<String> getVersion(var rootPath) { | 8 Future<String> getVersion(var rootPath) { |
8 var suffix = Platform.operatingSystem == 'windows' ? '.exe' : ''; | 9 var suffix = Platform.operatingSystem == 'windows' ? '.exe' : ''; |
9 var printVersionScript = rootPath.resolve("tools/print_version.py"); | 10 var printVersionScript = rootPath.resolve("tools/print_version.py"); |
10 return Process | 11 return Process |
11 .run("python$suffix", [printVersionScript.toFilePath()]).then((result) { | 12 .run("python$suffix", [printVersionScript.toFilePath()]).then((result) { |
12 if (result.exitCode != 0) { | 13 if (result.exitCode != 0) { |
13 throw "Could not generate version"; | 14 throw "Could not generate version"; |
14 } | 15 } |
15 return result.stdout.trim(); | 16 return result.stdout.trim(); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 getSnapshotGenerationFile(args, rootPath).then((result) { | 85 getSnapshotGenerationFile(args, rootPath).then((result) { |
85 var wrapper = "${args['output_dir']}/utils_wrapper.dart"; | 86 var wrapper = "${args['output_dir']}/utils_wrapper.dart"; |
86 writeSnapshotFile(wrapper, result); | 87 writeSnapshotFile(wrapper, result); |
87 }); | 88 }); |
88 | 89 |
89 getDart2jsSnapshotGenerationFile(args, rootPath).then((result) { | 90 getDart2jsSnapshotGenerationFile(args, rootPath).then((result) { |
90 var wrapper = "${args['output_dir']}/dart2js.dart"; | 91 var wrapper = "${args['output_dir']}/dart2js.dart"; |
91 writeSnapshotFile(wrapper, result); | 92 writeSnapshotFile(wrapper, result); |
92 }); | 93 }); |
93 } | 94 } |
OLD | NEW |