mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Create mach fetch
command
This commit is contained in:
parent
7afe037625
commit
d805e855a9
1 changed files with 20 additions and 5 deletions
|
@ -21,6 +21,12 @@ from mach.decorators import (
|
|||
|
||||
from servo.command_base import CommandBase, cd, call
|
||||
|
||||
CARGO_PATHS = [
|
||||
path.join('components', 'servo'),
|
||||
path.join('ports', 'cef'),
|
||||
path.join('ports', 'geckolib'),
|
||||
]
|
||||
|
||||
|
||||
@CommandProvider
|
||||
class MachCommands(CommandBase):
|
||||
|
@ -81,11 +87,7 @@ class MachCommands(CommandBase):
|
|||
print("flag or update all packages with --all-packages (-a) flag")
|
||||
sys.exit(1)
|
||||
|
||||
cargo_paths = [path.join('components', 'servo'),
|
||||
path.join('ports', 'cef'),
|
||||
path.join('ports', 'geckolib')]
|
||||
|
||||
for cargo_path in cargo_paths:
|
||||
for cargo_path in CARGO_PATHS:
|
||||
with cd(cargo_path):
|
||||
print(cargo_path)
|
||||
call(["cargo", "update"] + params,
|
||||
|
@ -153,6 +155,19 @@ class MachCommands(CommandBase):
|
|||
["git"] + ["grep"] + params + ['--'] + grep_paths + [':(exclude)*.min.js'],
|
||||
env=self.build_env())
|
||||
|
||||
@Command('fetch',
|
||||
description='Fetch Rust, Cargo and Cargo dependencies',
|
||||
category='devenv')
|
||||
def fetch(self):
|
||||
# Fetch Rust and Cargo
|
||||
self.ensure_bootstrapped()
|
||||
|
||||
# Fetch Cargo dependencies
|
||||
for cargo_path in CARGO_PATHS:
|
||||
with cd(cargo_path):
|
||||
print(cargo_path)
|
||||
call(["cargo", "fetch"], env=self.build_env())
|
||||
|
||||
@Command('wpt-upgrade',
|
||||
description='upgrade wptrunner.',
|
||||
category='devenv')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue