mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-06 16:56:55 +08:00
Fix autoroller main branch.
TBR=fbarchard@chromium.org No-Try: True Bug: libyuv:891 Change-Id: I33c31c2c675896ac936e216b246285052f74a51b Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/2854602 Reviewed-by: Mirko Bonadei <mbonadei@chromium.org> Commit-Queue: Mirko Bonadei <mbonadei@chromium.org>
This commit is contained in:
parent
51c6d12e7d
commit
eb6e7bb637
@ -366,12 +366,12 @@ def _IsTreeClean():
|
|||||||
def _EnsureUpdatedMasterBranch(dry_run):
|
def _EnsureUpdatedMasterBranch(dry_run):
|
||||||
current_branch = _RunCommand(
|
current_branch = _RunCommand(
|
||||||
['git', 'rev-parse', '--abbrev-ref', 'HEAD'])[0].splitlines()[0]
|
['git', 'rev-parse', '--abbrev-ref', 'HEAD'])[0].splitlines()[0]
|
||||||
if current_branch != 'master':
|
if current_branch != 'main':
|
||||||
logging.error('Please checkout the master branch and re-run this script.')
|
logging.error('Please checkout the main branch and re-run this script.')
|
||||||
if not dry_run:
|
if not dry_run:
|
||||||
sys.exit(-1)
|
sys.exit(-1)
|
||||||
|
|
||||||
logging.info('Updating master branch...')
|
logging.info('Updating main branch...')
|
||||||
_RunCommand(['git', 'pull'])
|
_RunCommand(['git', 'pull'])
|
||||||
|
|
||||||
|
|
||||||
@ -384,7 +384,7 @@ def _CreateRollBranch(dry_run):
|
|||||||
def _RemovePreviousRollBranch(dry_run):
|
def _RemovePreviousRollBranch(dry_run):
|
||||||
active_branch, branches = _GetBranches()
|
active_branch, branches = _GetBranches()
|
||||||
if active_branch == ROLL_BRANCH_NAME:
|
if active_branch == ROLL_BRANCH_NAME:
|
||||||
active_branch = 'master'
|
active_branch = 'main'
|
||||||
if ROLL_BRANCH_NAME in branches:
|
if ROLL_BRANCH_NAME in branches:
|
||||||
logging.info('Removing previous roll branch (%s)', ROLL_BRANCH_NAME)
|
logging.info('Removing previous roll branch (%s)', ROLL_BRANCH_NAME)
|
||||||
if not dry_run:
|
if not dry_run:
|
||||||
@ -444,7 +444,7 @@ def main():
|
|||||||
'tryjobs.'))
|
'tryjobs.'))
|
||||||
p.add_argument('-i', '--ignore-unclean-workdir', action='store_true',
|
p.add_argument('-i', '--ignore-unclean-workdir', action='store_true',
|
||||||
default=False,
|
default=False,
|
||||||
help=('Ignore if the current branch is not master or if there '
|
help=('Ignore if the current branch is not main or if there '
|
||||||
'are uncommitted changes (default: %(default)s).'))
|
'are uncommitted changes (default: %(default)s).'))
|
||||||
grp = p.add_mutually_exclusive_group()
|
grp = p.add_mutually_exclusive_group()
|
||||||
grp.add_argument('--skip-cq', action='store_true', default=False,
|
grp.add_argument('--skip-cq', action='store_true', default=False,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user