diff options
author | Tetsuharu OHZEKI <saneyuki.snyk@gmail.com> | 2014-09-13 04:39:18 +0900 |
---|---|---|
committer | Tetsuharu OHZEKI <saneyuki.snyk@gmail.com> | 2014-09-13 04:39:18 +0900 |
commit | 8bed778a3d31e8c097370efdeb297ae66843a2ce (patch) | |
tree | 96a37c2c94ff5da59f5a38b7b6b0a908bfec1746 /python/servo/build_commands.py | |
parent | 97cabf204e2793fa54bcf58375af4ed8ee8c6ae4 (diff) | |
download | servo-8bed778a3d31e8c097370efdeb297ae66843a2ce.tar.gz servo-8bed778a3d31e8c097370efdeb297ae66843a2ce.zip |
Add 'mach clean'.
Diffstat (limited to 'python/servo/build_commands.py')
-rw-r--r-- | python/servo/build_commands.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index 7cb29628976..14553082e35 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -90,3 +90,23 @@ class MachCommands(CommandBase): if jobs is not None: opts += ["-j", jobs] subprocess.check_call(["cargo", "test", "--no-run"], env=self.build_env()) + + @Command('clean', + description='Clean the build directory.', + category='build') + @CommandArgument('--manifest-path', + default=None, + help='Path to the manifest to the package to clean') + @CommandArgument('--verbose', '-v', + action='store_true', + help='Print verbose output') + def clean(self, manifest_path, verbose=False): + self.ensure_bootstrapped() + + opts = [] + if manifest_path: + opts += ["--manifest-path", manifest_path] + if verbose: + opts += ["-v"] + + subprocess.check_call(["cargo", "clean"] + opts, env=self.build_env()) |