OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 """Upload a single file to a Google Storage Bucket. | 6 """Upload a single file to a Google Storage Bucket. |
7 | 7 |
8 To test: | 8 To test: |
9 cd .../build/scripts/slave/skia | 9 cd .../build/scripts/slave/skia |
10 PYTHONPATH=$PWD/../..:$PWD/../../../site_config python upload_to_bucket.py \ | 10 PYTHONPATH=$PWD/../..:$PWD/../../../site_config python upload_to_bucket.py \ |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 option_parser.add_option( | 43 option_parser.add_option( |
44 '', '--dest_gsbase', | 44 '', '--dest_gsbase', |
45 help='gs:// url indicating where to upload the file') | 45 help='gs:// url indicating where to upload the file') |
46 (options, _args) = option_parser.parse_args() | 46 (options, _args) = option_parser.parse_args() |
47 return upload_to_bucket(source_filepath=options.source_filepath, | 47 return upload_to_bucket(source_filepath=options.source_filepath, |
48 dest_gsbase=options.dest_gsbase) | 48 dest_gsbase=options.dest_gsbase) |
49 | 49 |
50 | 50 |
51 if '__main__' == __name__: | 51 if '__main__' == __name__: |
52 sys.exit(main(None)) | 52 sys.exit(main(None)) |
OLD | NEW |