Skip to content
Snippets Groups Projects
Commit 99506faa authored by Haibo Huang's avatar Haibo Huang Committed by android-build-merger
Browse files

[Updater] Check and update all supported projects

am: 1c7284ea

Change-Id: Ie4c456511c7635b6b3a69b257f8774417283379a
parents fb8168af 1c7284ea
No related branches found
No related tags found
No related merge requests found
......@@ -136,7 +136,7 @@ def _check_some(paths, delay):
def _check_all(delay):
results = {}
for path, dirs, files in os.walk(args.path):
for path, dirs, files in os.walk(fileutils.EXTERNAL_PATH):
dirs.sort(key=lambda d: d.lower())
if fileutils.METADATA_FILENAME in files:
# Skip sub directories.
......@@ -226,7 +226,7 @@ def parse_args():
'--json_output',
help='Path of a json file to write result to.')
check_parser.add_argument(
'--all',
'--all', action='store_true',
help='If set, check updates for all supported projects.')
check_parser.add_argument(
'--delay', default=0, type=int,
......
......@@ -50,6 +50,9 @@ def parse_args():
parser.add_argument(
'paths', nargs='*',
help='Paths of the project.')
parser.add_argument(
'--all', action='store_true',
help='Checks all projects.')
return parser.parse_args()
......@@ -155,11 +158,15 @@ def _upgrade(proj):
def _check_updates(args):
subprocess.run(['out/soong/host/linux-x86/bin/external_updater',
'check',
'--json_output', RESULT_FILE_PATH,
'--delay', '0'] + args.paths,
cwd=os.environ['ANDROID_BUILD_TOP'])
params = ['out/soong/host/linux-x86/bin/external_updater',
'check', '--json_output', RESULT_FILE_PATH,
'--delay', '0']
if args.all:
params.append('--all')
else:
params += args.paths
subprocess.run(params, cwd=os.environ['ANDROID_BUILD_TOP'])
def main():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment