OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2010 The Chromium OS 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 """This module uprevs Chrome for cbuildbot. | 7 """This module uprevs Chrome for cbuildbot. |
8 | 8 |
9 After calling, it prints outs CHROME_VERSION_ATOM=(version atom string). A | 9 After calling, it prints outs CHROME_VERSION_ATOM=(version atom string). A |
10 caller could then use this atom with emerge to build the newly uprevved version | 10 caller could then use this atom with emerge to build the newly uprevved version |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 | 338 |
339 if stable_candidate: | 339 if stable_candidate: |
340 Info('Stable candidate found %s' % stable_candidate) | 340 Info('Stable candidate found %s' % stable_candidate) |
341 else: | 341 else: |
342 Info('No stable candidate found.') | 342 Info('No stable candidate found.') |
343 | 343 |
344 os.chdir(overlay_dir) | 344 os.chdir(overlay_dir) |
345 work_branch = cros_mark_as_stable.GitBranch( | 345 work_branch = cros_mark_as_stable.GitBranch( |
346 cros_mark_as_stable.STABLE_BRANCH_NAME, options.tracking_branch) | 346 cros_mark_as_stable.STABLE_BRANCH_NAME, options.tracking_branch) |
347 work_branch.CreateBranch() | 347 work_branch.CreateBranch() |
348 chrome_version_atom = MarkChromeEBuildAsStable( | 348 try: |
349 stable_candidate, unstable_ebuild, chrome_rev, version_to_uprev, | 349 chrome_version_atom = MarkChromeEBuildAsStable( |
350 commit_to_use, overlay_dir, sticky_ebuild) | 350 stable_candidate, unstable_ebuild, chrome_rev, version_to_uprev, |
351 # Explicit print to communicate to caller. | 351 commit_to_use, overlay_dir, sticky_ebuild) |
352 if chrome_version_atom: | 352 # Explicit print to communicate to caller. |
353 print 'CHROME_VERSION_ATOM=%s' % chrome_version_atom | 353 if chrome_version_atom: |
| 354 print 'CHROME_VERSION_ATOM=%s' % chrome_version_atom |
| 355 else: |
| 356 work_branch.Delete() |
| 357 except: |
| 358 work_branch.Delete() |
| 359 raise |
354 | 360 |
355 | 361 |
356 if __name__ == '__main__': | 362 if __name__ == '__main__': |
357 main() | 363 main() |
OLD | NEW |