OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 # Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
3 # | 3 # |
4 # Use of this source code is governed by a BSD-style license | 4 # Use of this source code is governed by a BSD-style license |
5 # that can be found in the LICENSE file in the root of the source | 5 # that can be found in the LICENSE file in the root of the source |
6 # tree. An additional intellectual property rights grant can be found | 6 # tree. An additional intellectual property rights grant can be found |
7 # in the file PATENTS. All contributing project authors may | 7 # in the file PATENTS. All contributing project authors may |
8 # be found in the AUTHORS file in the root of the source tree. | 8 # be found in the AUTHORS file in the root of the source tree. |
9 | 9 |
10 """Script to roll chromium_revision in the WebRTC DEPS file.""" | 10 """Script to roll chromium_revision in the WebRTC DEPS file.""" |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
291 | 291 |
292 | 292 |
293 def _CreateRollBranch(dry_run): | 293 def _CreateRollBranch(dry_run): |
294 current_branch = _RunCommand( | 294 current_branch = _RunCommand( |
295 ['git', 'rev-parse', '--abbrev-ref', 'HEAD'])[0].splitlines()[0] | 295 ['git', 'rev-parse', '--abbrev-ref', 'HEAD'])[0].splitlines()[0] |
296 if current_branch != 'master': | 296 if current_branch != 'master': |
297 logging.error('Please checkout the master branch and re-run this script.') | 297 logging.error('Please checkout the master branch and re-run this script.') |
298 if not dry_run: | 298 if not dry_run: |
299 sys.exit(-1) | 299 sys.exit(-1) |
300 | 300 |
301 logging.info('Updating master branch...') | |
302 _RunCommand(['git', 'pull']) | |
pbos-webrtc
2015/06/09 09:34:31
Do you want to do this under a dry run? Also is th
kjellander_webrtc
2015/06/09 10:51:04
I thought it shouldn't never hurt your checkout to
| |
301 logging.info('Creating roll branch: %s', ROLL_BRANCH_NAME) | 303 logging.info('Creating roll branch: %s', ROLL_BRANCH_NAME) |
302 if not dry_run: | 304 if not dry_run: |
303 _RunCommand(['git', 'checkout', '-b', ROLL_BRANCH_NAME]) | 305 _RunCommand(['git', 'checkout', '-b', ROLL_BRANCH_NAME]) |
304 | 306 |
305 | 307 |
306 def _RemovePreviousRollBranch(dry_run): | 308 def _RemovePreviousRollBranch(dry_run): |
307 active_branch, branches = _GetBranches() | 309 active_branch, branches = _GetBranches() |
308 if active_branch == ROLL_BRANCH_NAME: | 310 if active_branch == ROLL_BRANCH_NAME: |
309 active_branch = 'master' | 311 active_branch = 'master' |
310 if ROLL_BRANCH_NAME in branches: | 312 if ROLL_BRANCH_NAME in branches: |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
382 _CreateRollBranch(opts.dry_run) | 384 _CreateRollBranch(opts.dry_run) |
383 UpdateDeps(deps_filename, current_cr_rev, opts.revision) | 385 UpdateDeps(deps_filename, current_cr_rev, opts.revision) |
384 _LocalCommit(commit_msg, opts.dry_run) | 386 _LocalCommit(commit_msg, opts.dry_run) |
385 _UploadCL(opts.dry_run) | 387 _UploadCL(opts.dry_run) |
386 _LaunchTrybots(opts.dry_run) | 388 _LaunchTrybots(opts.dry_run) |
387 return 0 | 389 return 0 |
388 | 390 |
389 | 391 |
390 if __name__ == '__main__': | 392 if __name__ == '__main__': |
391 sys.exit(main()) | 393 sys.exit(main()) |
OLD | NEW |