Extend sync_chrome to make use of a template gclient file.
This CL extends sync_chrome to accept an optional template gclient file,
which can be used to specify 'custom_deps' and 'custom_vars' of a the
gclient solution. sync_chrome then fills in additional information, such
as 'url' and 'deps_file', in the solutions to create the final gclient
file.
BUG=chromium:445960
TEST=Trybot runs on paladin, release, and chromiumos-sdk builders.
TEST=Manually test `sync_chrome --gclient_template`.
Change-Id: I74d3c756489b0a5896769f2022fb21b41f13fec9
Reviewed-on: https://chromium-review.googlesource.com/239228
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
diff --git a/scripts/sync_chrome.py b/scripts/sync_chrome.py
index 88f5b4d..1cc53d7 100644
--- a/scripts/sync_chrome.py
+++ b/scripts/sync_chrome.py
@@ -30,6 +30,7 @@
action='store_true', default=False)
parser.add_argument('--gclient', help=commandline.argparse.SUPPRESS,
default='gclient')
+ parser.add_argument('--gclient_template', help='Template gclient input file')
parser.add_argument('chrome_root', help='Directory to sync chrome in')
return parser
@@ -49,7 +50,8 @@
# Sync new Chrome.
gclient.WriteConfigFile(options.gclient, options.chrome_root,
- options.internal, options.version)
+ options.internal, options.version,
+ options.gclient_template)
sync_fn = functools.partial(
gclient.Sync, options.gclient, options.chrome_root, reset=options.reset)