| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 DEPS = [ | 5 DEPS = [ |
| 6 'bot_update', | 6 'bot_update', |
| 7 'chromium', | 7 'chromium', |
| 8 'file', |
| 8 'gclient', | 9 'gclient', |
| 9 'gsutil', | 10 'gsutil', |
| 10 'omahaproxy', | 11 'omahaproxy', |
| 11 'path', | 12 'path', |
| 12 'platform', | 13 'platform', |
| 13 'properties', | 14 'properties', |
| 14 'python', | 15 'python', |
| 15 'raw_io', | 16 'raw_io', |
| 16 'trigger', | 17 'trigger', |
| 17 ] | 18 ] |
| 18 | 19 |
| 19 | 20 |
| 20 def export_tarball(api, args, source, destination): | 21 def export_tarball(api, args, source, destination): |
| 21 try: | 22 try: |
| 22 temp_dir = api.path.mkdtemp('export_tarball') | 23 temp_dir = api.path.mkdtemp('export_tarball') |
| 23 api.python( | 24 api.python( |
| 24 'export_tarball', | 25 'export_tarball', |
| 25 api.chromium.resource('export_tarball.py'), | 26 api.chromium.resource('export_tarball.py'), |
| 26 args, | 27 args, |
| 27 cwd=temp_dir) | 28 cwd=temp_dir) |
| 28 api.gsutil.upload( | 29 api.gsutil.upload( |
| 29 api.path.join(temp_dir, source), | 30 api.path.join(temp_dir, source), |
| 30 'chromium-browser-official', | 31 'chromium-browser-official', |
| 31 destination) | 32 destination) |
| 32 finally: | 33 finally: |
| 33 api.path.rmtree('temp dir', temp_dir) | 34 api.file.rmtree('temp dir', temp_dir) |
| 34 | 35 |
| 35 | 36 |
| 36 def GenSteps(api): | 37 def GenSteps(api): |
| 37 if 'version' not in api.properties: | 38 if 'version' not in api.properties: |
| 38 ls_result = api.gsutil(['ls', 'gs://chromium-browser-official/'], | 39 ls_result = api.gsutil(['ls', 'gs://chromium-browser-official/'], |
| 39 stdout=api.raw_io.output()).stdout | 40 stdout=api.raw_io.output()).stdout |
| 40 missing_releases = set() | 41 missing_releases = set() |
| 41 # TODO(phajdan.jr): find better solution than hardcoding version number. | 42 # TODO(phajdan.jr): find better solution than hardcoding version number. |
| 42 # We do that currently (carryover from a solution this recipe is replacing) | 43 # We do that currently (carryover from a solution this recipe is replacing) |
| 43 # to avoid running into errors with older releases. | 44 # to avoid running into errors with older releases. |
| (...skipping 30 matching lines...) Expand all Loading... |
| 74 api.properties.generic(version='38.0.2125.122') + | 75 api.properties.generic(version='38.0.2125.122') + |
| 75 api.platform('linux', 64) | 76 api.platform('linux', 64) |
| 76 ) | 77 ) |
| 77 | 78 |
| 78 yield ( | 79 yield ( |
| 79 api.test('trigger') + | 80 api.test('trigger') + |
| 80 api.properties.generic() + | 81 api.properties.generic() + |
| 81 api.platform('linux', 64) + | 82 api.platform('linux', 64) + |
| 82 api.step_data('gsutil ls', stdout=api.raw_io.output('')) | 83 api.step_data('gsutil ls', stdout=api.raw_io.output('')) |
| 83 ) | 84 ) |
| OLD | NEW |