OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 # Copyright 2014 The Chromium Authors. All rights reserved. | 3 # Copyright 2014 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 '''Publishes a set of extensions to the webstore. | 7 '''Publishes a set of extensions to the webstore. |
8 Given an unpacked extension, compresses and sends to the Chrome webstore. | 8 Given an unpacked extension, compresses and sends to the Chrome webstore. |
9 | 9 |
10 Releasing to the webstore should involve the following manual steps before | 10 Releasing to the webstore should involve the following manual steps before |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 def MakeChromeVoxManifest(): | 62 def MakeChromeVoxManifest(): |
63 '''Create a manifest for the webstore. | 63 '''Create a manifest for the webstore. |
64 | 64 |
65 Returns: | 65 Returns: |
66 Temporary file with generated manifest. | 66 Temporary file with generated manifest. |
67 ''' | 67 ''' |
68 new_file = tempfile.NamedTemporaryFile(mode='w+a', bufsize=0) | 68 new_file = tempfile.NamedTemporaryFile(mode='w+a', bufsize=0) |
69 in_file_name = os.path.join(_SCRIPT_DIR, os.path.pardir, | 69 in_file_name = os.path.join(_SCRIPT_DIR, os.path.pardir, |
70 'manifest.json.jinja2') | 70 'manifest.json.jinja2') |
71 context = { | 71 context = { |
| 72 'is_chromeos': '0', |
72 'is_chromevox_classic': '1', | 73 'is_chromevox_classic': '1', |
73 'is_guest_manifest': '0', | 74 'is_guest_manifest': '0', |
74 'is_js_compressed': '1', | 75 'is_js_compressed': '1', |
75 'set_version': GetVersion() | 76 'set_version': GetVersion() |
76 } | 77 } |
77 generate_manifest.processJinjaTemplate(in_file_name, new_file.name, context) | 78 generate_manifest.processJinjaTemplate(in_file_name, new_file.name, context) |
78 return new_file | 79 return new_file |
79 | 80 |
80 | 81 |
81 def RunInteractivePrompt(client_secret, output_path): | 82 def RunInteractivePrompt(client_secret, output_path): |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 print('Uploading...%s' % | 147 print('Uploading...%s' % |
147 webstore_extension_util.PostUpload(output_path.name, client_secret)) | 148 webstore_extension_util.PostUpload(output_path.name, client_secret)) |
148 print('publishing...%s' % | 149 print('publishing...%s' % |
149 webstore_extension_util.PostPublish(client_secret).read()) | 150 webstore_extension_util.PostPublish(client_secret).read()) |
150 else: | 151 else: |
151 RunInteractivePrompt(client_secret, output_path) | 152 RunInteractivePrompt(client_secret, output_path) |
152 | 153 |
153 | 154 |
154 if __name__ == '__main__': | 155 if __name__ == '__main__': |
155 main() | 156 main() |
OLD | NEW |