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

Side by Side Diff: mojo/tools/deploy.py

Issue 1016143002: Update deploy and deploy_sdk for the new package: world. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « no previous file | sky/apk/demo/org/domokit/sky/demo/SkyDemoActivity.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 import logging 7 import logging
8 import os 8 import os
9 import shutil 9 import shutil
10 import subprocess 10 import subprocess
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 def deploy_path(rel_path): 86 def deploy_path(rel_path):
87 return os.path.join(args.deploy_root, rel_path) 87 return os.path.join(args.deploy_root, rel_path)
88 88
89 def src_path(rel_path): 89 def src_path(rel_path):
90 return os.path.join(paths.src_root, rel_path) 90 return os.path.join(paths.src_root, rel_path)
91 91
92 copy(paths.build_dir, deploy_path('mojo'), mojo_filter) 92 copy(paths.build_dir, deploy_path('mojo'), mojo_filter)
93 copy(src_path('mojo/public'), deploy_path('mojo/public'), 93 copy(src_path('mojo/public'), deploy_path('mojo/public'),
94 sky_or_dart_filter) 94 sky_or_dart_filter)
95 95
96 # TODO(eseidel): All of these should be removed and package: sky includes
97 # used instead.
96 copy(src_path('sky/examples'), deploy_path('sky/examples'), 98 copy(src_path('sky/examples'), deploy_path('sky/examples'),
97 sky_or_dart_filter) 99 sky_or_dart_filter)
98 copy(src_path('sky/framework'), deploy_path('sky/framework'), 100 copy(src_path('sky/framework'), deploy_path('sky/framework'),
99 sky_or_dart_filter) 101 sky_or_dart_filter)
100 copy(os.path.join(paths.build_dir, 'gen'), deploy_path('gen'), gen_filter) 102 copy(os.path.join(paths.build_dir, 'gen'), deploy_path('gen'), gen_filter)
101 copy(src_path('sky/assets'), deploy_path('sky/assets'), assets_filter) 103 copy(src_path('sky/assets'), deploy_path('sky/assets'), assets_filter)
102 104
103
104 shutil.copy(os.path.join(paths.build_dir, 'apks', 'MojoShell.apk'), 105 shutil.copy(os.path.join(paths.build_dir, 'apks', 'MojoShell.apk'),
105 args.deploy_root) 106 args.deploy_root)
106 shutil.copy(os.path.join(paths.build_dir, 'apks', 'MojoShortcuts.apk'), 107 shutil.copy(os.path.join(paths.build_dir, 'apks', 'MojoShortcuts.apk'),
107 args.deploy_root) 108 args.deploy_root)
108 109
110 packages_root = deploy_path('packages')
111 if os.path.exists(packages_root):
112 shutil.rmtree(packages_root)
113 subprocess.check_call([
114 src_path('sky/tools/deploy_sdk.py'),
115 '--non-interactive',
116 deploy_path('sky_sdk'),
117 '--fake-pub-get-into',
118 packages_root
119 ])
109 120
110 with open(deploy_path('LICENSES.sky'), 'w') as license_file: 121 with open(deploy_path('LICENSES.sky'), 'w') as license_file:
111 subprocess.check_call([src_path('tools/licenses.py'), 'credits'], 122 subprocess.check_call([src_path('tools/licenses.py'), 'credits'],
112 stdout=license_file) 123 stdout=license_file)
113 124
114 125
115 subprocess.check_call(['git', 'add', '.'], cwd=args.deploy_root) 126 subprocess.check_call(['git', 'add', '.'], cwd=args.deploy_root)
116 subprocess.check_call([ 127 subprocess.check_call([
117 'git', 'commit', 128 'git', 'commit',
118 '-m', '%s from %s' % (rel_build_dir, git_revision()) 129 '-m', '%s from %s' % (rel_build_dir, git_revision())
119 ], cwd=args.deploy_root) 130 ], cwd=args.deploy_root)
120 131
121 132
122 if __name__ == '__main__': 133 if __name__ == '__main__':
123 main() 134 main()
OLDNEW
« no previous file with comments | « no previous file | sky/apk/demo/org/domokit/sky/demo/SkyDemoActivity.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698