mirror of
https://github.com/servo/servo.git
synced 2025-07-03 05:23:38 +01:00
implement mach clean-uwp
This commit is contained in:
parent
ef2b9863d1
commit
3efa840674
1 changed files with 19 additions and 9 deletions
|
@ -766,6 +766,18 @@ class MachCommands(CommandBase):
|
||||||
print('Removing virtualenv directory: %s' % virtualenv_path)
|
print('Removing virtualenv directory: %s' % virtualenv_path)
|
||||||
shutil.rmtree(virtualenv_path)
|
shutil.rmtree(virtualenv_path)
|
||||||
|
|
||||||
|
self.clean_uwp()
|
||||||
|
|
||||||
|
opts = ["--manifest-path", manifest_path or path.join(self.context.topdir, "Cargo.toml")]
|
||||||
|
if verbose:
|
||||||
|
opts += ["-v"]
|
||||||
|
opts += params
|
||||||
|
return check_call(["cargo", "clean"] + opts, env=self.build_env(), verbose=verbose)
|
||||||
|
|
||||||
|
@Command('clean-uwp',
|
||||||
|
description='Clean the support/hololens/ directory.',
|
||||||
|
category='build')
|
||||||
|
def clean_uwp(self):
|
||||||
uwp_artifacts = [
|
uwp_artifacts = [
|
||||||
"support/hololens/x64/",
|
"support/hololens/x64/",
|
||||||
"support/hololens/ARM/",
|
"support/hololens/ARM/",
|
||||||
|
@ -780,18 +792,16 @@ class MachCommands(CommandBase):
|
||||||
"support/hololens/ServoApp/Release/",
|
"support/hololens/ServoApp/Release/",
|
||||||
"support/hololens/packages/",
|
"support/hololens/packages/",
|
||||||
"support/hololens/AppPackages/",
|
"support/hololens/AppPackages/",
|
||||||
|
"support/hololens/ServoApp/ServoApp.vcxproj.user",
|
||||||
]
|
]
|
||||||
|
|
||||||
for uwp_artifact in uwp_artifacts:
|
for uwp_artifact in uwp_artifacts:
|
||||||
dir_path = path.join(self.get_top_dir(), uwp_artifact)
|
artifact = path.join(self.get_top_dir(), uwp_artifact)
|
||||||
if path.exists(dir_path):
|
if path.exists(artifact):
|
||||||
shutil.rmtree(dir_path)
|
if path.isdir(artifact):
|
||||||
|
shutil.rmtree(artifact)
|
||||||
opts = ["--manifest-path", manifest_path or path.join(self.context.topdir, "Cargo.toml")]
|
else:
|
||||||
if verbose:
|
os.remove(artifact)
|
||||||
opts += ["-v"]
|
|
||||||
opts += params
|
|
||||||
return check_call(["cargo", "clean"] + opts, env=self.build_env(), verbose=verbose)
|
|
||||||
|
|
||||||
|
|
||||||
def angle_root(target, nuget_env):
|
def angle_root(target, nuget_env):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue