From 675ae92cb5cddf808e9bc563d417e036bf335637 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Wed, 11 Oct 2017 15:41:48 +0200 Subject: [PATCH] =?UTF-8?q?mach=20clean-nightlies:=20don=E2=80=99t=20remov?= =?UTF-8?q?e=20everything=20versioned=20by=20date?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (Dates contain `-`.) --- python/servo/bootstrap_commands.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py index 593fd6cb634..5d09fadb806 100644 --- a/python/servo/bootstrap_commands.py +++ b/python/servo/bootstrap_commands.py @@ -317,11 +317,9 @@ class MachCommands(CommandBase): full_path = path.join(base, name) if name.startswith("rust-"): name = name[len("rust-"):] - # We append `-alt` if LLVM assertions aren't enabled, - # so use just the commit hash itself. - # This may occasionally leave an extra nightly behind - # but won't remove too many nightlies. - if name.partition('-')[0] not in to_keep: + if name.endswith("-alt"): + name = name[:-len("-alt")] + if name not in to_keep: removing_anything = True if force: print("Removing {}".format(full_path))