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 |
11 import subprocess | 11 import subprocess |
12 import sys | 12 import sys |
13 import utils | 13 import utils |
14 | 14 |
15 SCRIPT_DIR = os.path.dirname(sys.argv[0]) | 15 SCRIPT_DIR = os.path.dirname(sys.argv[0]) |
16 DART_ROOT = os.path.realpath(os.path.join(SCRIPT_DIR, '..')) | 16 DART_ROOT = os.path.realpath(os.path.join(SCRIPT_DIR, '..')) |
17 PUB_PATH = os.path.join(DART_ROOT, 'third_party', 'pkg', | 17 PUB_PATH = os.path.join(DART_ROOT, 'third_party', 'pkg', |
18 'pub', 'bin', 'pub.dart') | 18 'pub', 'bin', 'pub.dart') |
19 IGNORE_PATTERNS = shutil.ignore_patterns( | 19 IGNORE_PATTERNS = shutil.ignore_patterns( |
20 '*.map', | 20 '*.map', |
21 '*.concat.js', | 21 '*.concat.js', |
22 '*.scriptUrls', | 22 '*.scriptUrls', |
23 '*.precompiled.js', | 23 '*.precompiled.js', |
24 'main.*', | 24 'bower.json', |
| 25 'package.json', |
| 26 'CustomElements.*', |
| 27 'dart_support.*', |
| 28 'interop_support.*', |
| 29 'HTMLImports.*', |
| 30 'MutationObserver.*', |
| 31 'ShadowDOM.*', |
| 32 'webcomponents.*', |
| 33 'webcomponents-lite.js', |
25 'unittest*', | 34 'unittest*', |
26 '*_buildLogs*', | 35 '*_buildLogs*', |
27 '*.log', | 36 '*.log', |
28 '*~') | 37 '*~') |
29 | 38 |
30 usage = """observatory_tool.py [options]""" | 39 usage = """observatory_tool.py [options]""" |
31 | 40 |
32 def CreateTimestampFile(options): | 41 def CreateTimestampFile(options): |
33 if options.stamp != '': | 42 if options.stamp != '': |
34 dir_name = os.path.dirname(options.stamp) | 43 dir_name = os.path.dirname(options.stamp) |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 # Pub must be run from the project's root directory. | 227 # Pub must be run from the project's root directory. |
219 ChangeDirectory(options.directory) | 228 ChangeDirectory(options.directory) |
220 result = ExecuteCommand(options, args) | 229 result = ExecuteCommand(options, args) |
221 if result == 0: | 230 if result == 0: |
222 CreateTimestampFile(options) | 231 CreateTimestampFile(options) |
223 return result | 232 return result |
224 | 233 |
225 | 234 |
226 if __name__ == '__main__': | 235 if __name__ == '__main__': |
227 sys.exit(main()); | 236 sys.exit(main()); |
OLD | NEW |