@@ -386,11 +386,11 @@ def full_target_name(repository, target):
386
386
raise RuntimeError ('Cannot determine if %s is a branch or a tag' % target )
387
387
388
388
389
- def skip_list_for_platform (config ):
389
+ def skip_list_for_platform (config , treat_like_platform = None ):
390
390
# If there is a platforms key only include the repo if the
391
391
# plaform is in the list
392
392
skip_list = []
393
- platform_name = platform .system ()
393
+ platform_name = treat_like_platform or platform .system ()
394
394
395
395
for repo_name , repo_info in config ['repos' ].items ():
396
396
if 'platforms' in repo_info :
@@ -479,6 +479,10 @@ def main():
479
479
help = "Number of threads to run at once" ,
480
480
default = 0 ,
481
481
dest = "n_processes" )
482
+ parser .add_argument (
483
+ '--platform' ,
484
+ help = 'Clone as if the platform was the one specified, useful for e.g. Docker use.' ,
485
+ dest = "platform" )
482
486
args = parser .parse_args ()
483
487
484
488
if not args .scheme :
@@ -526,7 +530,7 @@ def main():
526
530
if scheme is None :
527
531
scheme = config ['default-branch-scheme' ]
528
532
529
- skip_repo_list = skip_list_for_platform (config )
533
+ skip_repo_list = skip_list_for_platform (config , args . platform )
530
534
skip_repo_list .extend (args .skip_repository_list )
531
535
clone_results = obtain_all_additional_swift_sources (args , config ,
532
536
clone_with_ssh ,
0 commit comments