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

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

Issue 1163323007: Make it possible to navigate from a SkyView to a WebView. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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/shell/ui/engine.cc » ('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 """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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 return True 57 return True
58 if os.path.basename(os.path.dirname(path)) != '2x_web': 58 if os.path.basename(os.path.dirname(path)) != '2x_web':
59 return False 59 return False
60 # We only use the 18 and 24s for now. 60 # We only use the 18 and 24s for now.
61 return '18dp' in path or '24dp' in path 61 return '18dp' in path or '24dp' in path
62 62
63 63
64 def packages_filter(path): 64 def packages_filter(path):
65 if 'packages/sky/assets/material-design-icons/' in path: 65 if 'packages/sky/assets/material-design-icons/' in path:
66 return assets_filter(path) 66 return assets_filter(path)
67 if '.gitignore' in path:
68 return False
67 return True 69 return True
68 70
69 71
70 def copy(from_root, to_root, filter_func=None, followlinks=False): 72 def copy(from_root, to_root, filter_func=None, followlinks=False):
71 if os.path.exists(to_root): 73 if os.path.exists(to_root):
72 shutil.rmtree(to_root) 74 shutil.rmtree(to_root)
73 os.makedirs(to_root) 75 os.makedirs(to_root)
74 76
75 for root, dirs, files in os.walk(from_root, followlinks=followlinks): 77 for root, dirs, files in os.walk(from_root, followlinks=followlinks):
76 # filter_func expects paths not names, so wrap it to make them absolute. 78 # filter_func expects paths not names, so wrap it to make them absolute.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 # Run git commands. 137 # Run git commands.
136 subprocess.check_call(['git', 'add', '.'], cwd=args.deploy_root) 138 subprocess.check_call(['git', 'add', '.'], cwd=args.deploy_root)
137 subprocess.check_call([ 139 subprocess.check_call([
138 'git', 'commit', 140 'git', 'commit',
139 '-m', '%s from %s' % (rel_build_dir, git_revision()) 141 '-m', '%s from %s' % (rel_build_dir, git_revision())
140 ], cwd=args.deploy_root) 142 ], cwd=args.deploy_root)
141 143
142 144
143 if __name__ == '__main__': 145 if __name__ == '__main__':
144 main() 146 main()
OLDNEW
« no previous file with comments | « no previous file | sky/shell/ui/engine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698