diff --git a/chromium_version.txt b/chromium_version.txt index f1bbdd2a..aae2dace 100644 --- a/chromium_version.txt +++ b/chromium_version.txt @@ -1 +1 @@ -150.0.7871.181 +150.0.7871.186 diff --git a/utils/clone.py b/utils/clone.py index 079c378c..dfe10787 100755 --- a/utils/clone.py +++ b/utils/clone.py @@ -87,6 +87,13 @@ def clone(args): # pylint: disable=too-many-branches, too-many-locals, too-many- ucstaging.mkdir(exist_ok=True) get_logger().info('Cloning depot_tools') + dt_commit = re.search(r"depot_tools\.git'\s*\+\s*'@'\s*\+\s*'([^']+)',", + Path(args.output / 'DEPS').read_text(encoding=ENCODING)).group(1) + if args.dt_commit: + dt_commit = args.dt_commit + if not dt_commit: + get_logger().error('Unable to obtain commit for depot_tools checkout') + sys.exit(1) if not dtpath.exists(): dtpath.mkdir() run(['git', 'init', '-q'], cwd=dtpath, check=True) @@ -96,8 +103,8 @@ def clone(args): # pylint: disable=too-many-branches, too-many-locals, too-many- ], cwd=dtpath, check=True) - run(['git', 'fetch', '--depth=1', 'origin', 'main'], cwd=dtpath, check=True) - run(['git', 'reset', '--hard', 'FETCH_HEAD'], cwd=dtpath, check=True) + run(['git', 'fetch', '--depth=1', 'origin', dt_commit], cwd=dtpath, check=True) + run(['git', 'reset', '--hard', dt_commit], cwd=dtpath, check=True) run(['git', 'clean', '-ffdx'], cwd=dtpath, check=True) if iswin: (dtpath / 'git.bat').write_text('git') @@ -269,6 +276,9 @@ def main(): '--sysroot', choices=('amd64', 'arm64', 'armhf', 'i386', 'mips64el', 'mipsel'), help='Download a linux sysroot for the given architecture') + parser.add_argument('--dt-commit', + help=('Specify a commit for the depot_tools checkout. ' + 'Defaults to using the commit specified in the DEPS file.')) add_common_params(parser) args = parser.parse_args() clone(args)