| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2015 The Chromium Authors. All rights reserved. | 2 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 import argparse | 6 import argparse |
| 7 from datetime import datetime | 7 from datetime import datetime |
| 8 import logging | 8 import logging |
| 9 import os | 9 import os |
| 10 import shutil | 10 import shutil |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 99 |
| 100 def sdk_path(rel_path): | 100 def sdk_path(rel_path): |
| 101 return os.path.join(sdk_root, rel_path) | 101 return os.path.join(sdk_root, rel_path) |
| 102 | 102 |
| 103 def src_path(rel_path): | 103 def src_path(rel_path): |
| 104 return os.path.join(SRC_ROOT, rel_path) | 104 return os.path.join(SRC_ROOT, rel_path) |
| 105 | 105 |
| 106 ensure_dir_exists(sdk_root) | 106 ensure_dir_exists(sdk_root) |
| 107 # Manually clear sdk_root above to avoid deleting dot-files. | 107 # Manually clear sdk_root above to avoid deleting dot-files. |
| 108 delete_all_non_hidden_files_in_directory(sdk_root, args.non_interactive) | 108 delete_all_non_hidden_files_in_directory(sdk_root, args.non_interactive) |
| 109 copy(src_path('sky/examples'), sdk_path('examples')) | |
| 110 | 109 |
| 111 copy(src_path('sky/sdk/README.md'), sdk_root) | 110 copy(src_path('sky/sdk/README.md'), sdk_root) |
| 112 | 111 |
| 113 ensure_dir_exists(sdk_path('packages')) | 112 ensure_dir_exists(sdk_path('packages')) |
| 114 subprocess.check_call([ | 113 subprocess.check_call([ |
| 115 'mojo/tools/prepare_pub_packages.py', | 114 'mojo/tools/prepare_pub_packages.py', |
| 116 '--out-dir', sdk_path('packages'), | 115 '--out-dir', sdk_path('packages'), |
| 117 'out' | 116 'out' |
| 118 ]) | 117 ]) |
| 119 | 118 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 136 'git', 'commit', | 135 'git', 'commit', |
| 137 '-m', commit_message | 136 '-m', commit_message |
| 138 ], cwd=sdk_root) | 137 ], cwd=sdk_root) |
| 139 | 138 |
| 140 time_delta = datetime.now() - start_time | 139 time_delta = datetime.now() - start_time |
| 141 print 'SDK built at %s in %ss' % (sdk_root, time_delta.total_seconds()) | 140 print 'SDK built at %s in %ss' % (sdk_root, time_delta.total_seconds()) |
| 142 | 141 |
| 143 | 142 |
| 144 if __name__ == '__main__': | 143 if __name__ == '__main__': |
| 145 main() | 144 main() |
| OLD | NEW |