OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 2 # Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
3 # for details. All rights reserved. Use of this source code is governed by a | 3 # for details. All rights reserved. Use of this source code is governed by a |
4 # BSD-style license that can be found in the LICENSE file. | 4 # BSD-style license that can be found in the LICENSE file. |
5 """Helper for building and deploying Observatory""" | 5 """Helper for building and deploying Observatory""" |
6 | 6 |
7 import argparse | 7 import argparse |
8 import os | 8 import os |
9 import platform | 9 import platform |
10 import shutil | 10 import shutil |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 return 1 | 203 return 1 |
204 # Calculate absolute paths before changing directory. | 204 # Calculate absolute paths before changing directory. |
205 if (options.package_root != None): | 205 if (options.package_root != None): |
206 options.package_root = os.path.abspath(options.package_root) | 206 options.package_root = os.path.abspath(options.package_root) |
207 if (options.dart_executable != None): | 207 if (options.dart_executable != None): |
208 options.dart_executable = os.path.abspath(options.dart_executable) | 208 options.dart_executable = os.path.abspath(options.dart_executable) |
209 if (options.pub_executable != None): | 209 if (options.pub_executable != None): |
210 options.pub_executable = os.path.abspath(options.pub_executable) | 210 options.pub_executable = os.path.abspath(options.pub_executable) |
211 if (options.pub_snapshot != None): | 211 if (options.pub_snapshot != None): |
212 options.pub_snapshot = os.path.abspath(options.pub_snapshot) | 212 options.pub_snapshot = os.path.abspath(options.pub_snapshot) |
| 213 if (options.stamp != ''): |
| 214 options.stamp = os.path.abspath(options.stamp) |
213 if len(args) == 1: | 215 if len(args) == 1: |
214 args[0] = os.path.abspath(args[0]) | 216 args[0] = os.path.abspath(args[0]) |
215 # Pub must be run from the project's root directory. | 217 # Pub must be run from the project's root directory. |
216 ChangeDirectory(options.directory) | 218 ChangeDirectory(options.directory) |
217 result = ExecuteCommand(options, args) | 219 result = ExecuteCommand(options, args) |
218 if result == 0: | 220 if result == 0: |
219 CreateTimestampFile(options) | 221 CreateTimestampFile(options) |
220 return result | 222 return result |
221 | 223 |
222 | 224 |
223 if __name__ == '__main__': | 225 if __name__ == '__main__': |
224 sys.exit(main()); | 226 sys.exit(main()); |
OLD | NEW |