| 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 """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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 if os.path.isdir(path): | 48 if os.path.isdir(path): |
| 49 return True | 49 return True |
| 50 _, ext = os.path.splitext(path) | 50 _, ext = os.path.splitext(path) |
| 51 # .dart includes '.mojom.dart' | 51 # .dart includes '.mojom.dart' |
| 52 return ext == '.sky' or ext == '.dart' | 52 return ext == '.sky' or ext == '.dart' |
| 53 | 53 |
| 54 | 54 |
| 55 def assets_filter(path): | 55 def assets_filter(path): |
| 56 if os.path.isdir(path): | 56 if os.path.isdir(path): |
| 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)) != 'drawable-xxhdpi': |
| 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: | 67 if '.gitignore' in path: |
| 68 return False | 68 return False |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 # Run git commands. | 151 # Run git commands. |
| 152 subprocess.check_call(['git', 'add', '.'], cwd=args.deploy_root) | 152 subprocess.check_call(['git', 'add', '.'], cwd=args.deploy_root) |
| 153 subprocess.check_call([ | 153 subprocess.check_call([ |
| 154 'git', 'commit', | 154 'git', 'commit', |
| 155 '-m', '%s from %s' % (rel_build_dir, git_revision()) | 155 '-m', '%s from %s' % (rel_build_dir, git_revision()) |
| 156 ], cwd=args.deploy_root) | 156 ], cwd=args.deploy_root) |
| 157 | 157 |
| 158 | 158 |
| 159 if __name__ == '__main__': | 159 if __name__ == '__main__': |
| 160 main() | 160 main() |
| OLD | NEW |