|
22 | 22 | BuildArguments, |
23 | 23 | DumpManifestShaArguments, |
24 | 24 | FindArguments, |
| 25 | + FindBuildArguments, |
25 | 26 | add_args_to_parser, |
26 | 27 | apply_config_file, |
27 | 28 | ) |
@@ -386,23 +387,32 @@ def main(): |
386 | 387 | sys.exit(0) |
387 | 388 |
|
388 | 389 | kwargs = vars(args) |
| 390 | + kwargs_without_none = drop_none_kwargs(kwargs) |
389 | 391 | action = kwargs.pop('action') |
390 | 392 | config_file = kwargs.pop('config_file') |
391 | 393 | if config_file: |
392 | 394 | apply_config_file(config_file) |
393 | 395 |
|
394 | 396 | if action == 'dump-manifest-sha': |
395 | | - arguments = DumpManifestShaArguments(**drop_none_kwargs(kwargs)) |
| 397 | + arguments = DumpManifestShaArguments(**kwargs_without_none) |
396 | 398 | Manifest.from_files(arguments.manifest_files).dump_sha_values(arguments.output) |
397 | 399 | sys.exit(0) |
398 | | - elif action == 'find': |
399 | | - arguments = FindArguments(**drop_none_kwargs(kwargs)) |
| 400 | + |
| 401 | + if action == 'find': |
| 402 | + arguments = FindArguments(**kwargs_without_none) |
| 403 | + find_arguments = arguments |
400 | 404 | else: |
401 | | - arguments = BuildArguments(**drop_none_kwargs(kwargs)) |
| 405 | + arguments = BuildArguments(**kwargs_without_none) |
| 406 | + |
| 407 | + # Because build needs to find apps, we need to create find_arguments here |
| 408 | + find_arguments = FindArguments( |
| 409 | + **{k: v for k, v in kwargs_without_none.items() if k in FindBuildArguments.model_fields} |
| 410 | + ) |
402 | 411 |
|
403 | 412 | # real call starts here |
404 | 413 | # build also needs to find first |
405 | | - apps = find_apps(args.paths, args.target, find_arguments=arguments) |
| 414 | + apps = find_apps(args.paths, args.target, find_arguments=find_arguments) |
| 415 | + |
406 | 416 | if isinstance(arguments, FindArguments): # find only |
407 | 417 | if arguments.output: |
408 | 418 | os.makedirs(os.path.dirname(os.path.realpath(arguments.output)), exist_ok=True) |
@@ -444,6 +454,12 @@ def main(): |
444 | 454 | for app in failed_apps: |
445 | 455 | print(f' {app}') |
446 | 456 |
|
| 457 | + disabled_apps = [app for app in apps if app.build_status == BuildStatus.DISABLED] |
| 458 | + if disabled_apps: |
| 459 | + print('Disabled the following apps:') |
| 460 | + for app in disabled_apps: |
| 461 | + print(f' {app}') |
| 462 | + |
447 | 463 | if ret_code != 0: |
448 | 464 | sys.exit(ret_code) |
449 | 465 |
|
|
0 commit comments