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

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

Issue 1165003006: Various fixes in preparation for deploying (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Remove game changes Created 5 years, 6 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/sdk/lib/framework/fn.dart » ('j') | sky/shell/ui/engine.cc » ('J')
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 """Deploy domokit.github.io""" 6 """Deploy domokit.github.io"""
7 7
8 # NOTE: Requires that download_material_design_icons to have been run from 8 # NOTE: Requires that download_material_design_icons to have been run from
9 # $build_dir/gen/dart-dpkg/sky. 9 # $build_dir/gen/dart-dpkg/sky.
10 10
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 # Verify that material-design-icons have been downloaded. 114 # Verify that material-design-icons have been downloaded.
115 icons_dir = os.path.join(dart_pkg_packages_dir, 115 icons_dir = os.path.join(dart_pkg_packages_dir,
116 'sky/assets/material-design-icons') 116 'sky/assets/material-design-icons')
117 if not os.path.isdir(icons_dir): 117 if not os.path.isdir(icons_dir):
118 print('NOTE: Running `download_material_design_icons` for you.'); 118 print('NOTE: Running `download_material_design_icons` for you.');
119 subprocess.check_call([ 119 subprocess.check_call([
120 os.path.join(sky_pkg_lib_dir, 'download_material_design_icons') 120 os.path.join(sky_pkg_lib_dir, 'download_material_design_icons')
121 ]) 121 ])
122 122
123 # Copy all .mojo files into mojo/
124 copy(paths.build_dir, deploy_path('mojo'), mojo_filter)
125
126 # Copy sky/examples into examples/ 123 # Copy sky/examples into examples/
127 copy(src_path('sky/examples'), deploy_path('examples'), examples_filter) 124 copy(src_path('sky/examples'), deploy_path('examples'), examples_filter)
128 125
129 # Copy apks into /
130 shutil.copy(os.path.join(paths.build_dir, 'apks', 'MojoShell.apk'),
131 args.deploy_root)
132 shutil.copy(os.path.join(paths.build_dir, 'apks', 'MojoShortcuts.apk'),
133 args.deploy_root)
134
135 # Deep copy packages/. This follows symlinks and flattens them. 126 # Deep copy packages/. This follows symlinks and flattens them.
136 packages_root = deploy_path('packages') 127 packages_root = deploy_path('packages')
137 copy(dart_pkg_packages_dir, packages_root, packages_filter, True) 128 copy(dart_pkg_packages_dir, packages_root, packages_filter, True)
138 129
139 # Write out license. 130 # Write out license.
140 with open(deploy_path('LICENSES.sky'), 'w') as license_file: 131 with open(deploy_path('LICENSES.sky'), 'w') as license_file:
141 subprocess.check_call([src_path('tools/licenses.py'), 'credits'], 132 subprocess.check_call([src_path('tools/licenses.py'), 'credits'],
142 stdout=license_file) 133 stdout=license_file)
143 134
144 # Run git commands. 135 # Run git commands.
145 subprocess.check_call(['git', 'add', '.'], cwd=args.deploy_root) 136 subprocess.check_call(['git', 'add', '.'], cwd=args.deploy_root)
146 subprocess.check_call([ 137 subprocess.check_call([
147 'git', 'commit', 138 'git', 'commit',
148 '-m', '%s from %s' % (rel_build_dir, git_revision()) 139 '-m', '%s from %s' % (rel_build_dir, git_revision())
149 ], cwd=args.deploy_root) 140 ], cwd=args.deploy_root)
150 141
151 142
152 if __name__ == '__main__': 143 if __name__ == '__main__':
153 main() 144 main()
OLDNEW
« no previous file with comments | « no previous file | sky/sdk/lib/framework/fn.dart » ('j') | sky/shell/ui/engine.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698