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

Side by Side Diff: sky/tools/deploy_sdk.py

Issue 1218593002: Move sky/examples to sky/sdk/lib/example, and code changes to support that change. Fixes T277. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
OLDNEW
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
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
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()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698