From 8bed778a3d31e8c097370efdeb297ae66843a2ce Mon Sep 17 00:00:00 2001 From: Tetsuharu OHZEKI Date: Sat, 13 Sep 2014 04:39:18 +0900 Subject: Add 'mach clean'. --- python/servo/build_commands.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'python/servo/build_commands.py') 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()) -- cgit v1.2.3