From a66ad814f1c3a796c40808931d18e554fb8be37f Mon Sep 17 00:00:00 2001 From: Nick Alexander Date: Wed, 5 Jul 2017 13:25:04 -0700 Subject: [PATCH] Bug 1344244 - Post: Allow --application-choice to |mach bootstrap|. r=glandium MozReview-Commit-ID: 496iK5iTEPX --HG-- extra : rebase_source : 108fdd931b4b0d0b69e00ac9e14a1b22c4891605 --- python/mozboot/bin/bootstrap.py | 4 ++-- python/mozboot/mozboot/mach_commands.py | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/python/mozboot/bin/bootstrap.py b/python/mozboot/bin/bootstrap.py index d916351e7dc9..0820eaefc9b0 100755 --- a/python/mozboot/bin/bootstrap.py +++ b/python/mozboot/bin/bootstrap.py @@ -141,8 +141,8 @@ def main(args): 'content. Like --repo, you should not need to set this.') parser.add_option('--application-choice', dest='application_choice', - help='Pass in an application choice (desktop/android) instead of using the ' - 'default interactive prompt.') + help='Pass in an application choice (see mozboot.bootstrap.APPLICATIONS) ' + 'instead of using the default interactive prompt.') parser.add_option('--no-interactive', dest='no_interactive', action='store_true', help='Answer yes to any (Y/n) interactive prompts.') diff --git a/python/mozboot/mozboot/mach_commands.py b/python/mozboot/mozboot/mach_commands.py index 940ffabbb0a0..86d4de4c6163 100644 --- a/python/mozboot/mozboot/mach_commands.py +++ b/python/mozboot/mozboot/mach_commands.py @@ -19,10 +19,14 @@ class Bootstrap(object): @Command('bootstrap', category='devenv', description='Install required system packages for building.') - def bootstrap(self): + @CommandArgument('--application-choice', + default=None, + help='Pass in an application choice (see mozboot.bootstrap.APPLICATIONS) ' + 'instead of using the default interactive prompt.') + def bootstrap(self, application_choice=None): from mozboot.bootstrap import Bootstrapper - bootstrapper = Bootstrapper() + bootstrapper = Bootstrapper(choice=application_choice) bootstrapper.bootstrap()