mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
bootstrap: Add a --skip-platform
option (#32176)
This allows installign `taplo` and `crown` when you are installing dependencies manually.
This commit is contained in:
parent
3014e201ab
commit
4a12c06309
3 changed files with 12 additions and 5 deletions
|
@ -198,7 +198,9 @@ def bootstrap_command_only(topdir):
|
|||
import servo.util
|
||||
|
||||
try:
|
||||
servo.platform.get().bootstrap('-f' in sys.argv or '--force' in sys.argv)
|
||||
force = '-f' in sys.argv or '--force' in sys.argv
|
||||
skip_platform = '--skip-platform' in sys.argv
|
||||
servo.platform.get().bootstrap(force, skip_platform)
|
||||
except NotImplementedError as exception:
|
||||
print(exception)
|
||||
return 1
|
||||
|
|
|
@ -40,12 +40,15 @@ class MachCommands(CommandBase):
|
|||
@CommandArgument('--force', '-f',
|
||||
action='store_true',
|
||||
help='Boostrap without confirmation')
|
||||
def bootstrap(self, force=False):
|
||||
@CommandArgument('--skip-platform',
|
||||
action='store_true',
|
||||
help='Skip platform bootstrapping.')
|
||||
def bootstrap(self, force=False, skip_platform=False):
|
||||
# Note: This entry point isn't actually invoked by ./mach bootstrap.
|
||||
# ./mach bootstrap calls mach_bootstrap.bootstrap_command_only so that
|
||||
# it can install dependencies without needing mach's dependencies
|
||||
try:
|
||||
servo.platform.get().bootstrap(force)
|
||||
servo.platform.get().bootstrap(force, skip_platform)
|
||||
except NotImplementedError as exception:
|
||||
print(exception)
|
||||
return 1
|
||||
|
|
|
@ -54,10 +54,12 @@ class Base:
|
|||
except FileNotFoundError:
|
||||
return False
|
||||
|
||||
def bootstrap(self, force: bool):
|
||||
installed_something = self._platform_bootstrap(force)
|
||||
def bootstrap(self, force: bool, skip_platform: bool):
|
||||
if not skip_platform:
|
||||
installed_something = self._platform_bootstrap(force)
|
||||
installed_something |= self.install_taplo(force)
|
||||
installed_something |= self.install_crown(force)
|
||||
|
||||
if not installed_something:
|
||||
print("Dependencies were already installed!")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue