aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/bootstrap_commands.py
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2017-10-11 15:41:48 +0200
committerSimon Sapin <simon.sapin@exyr.org>2017-10-11 15:43:32 +0200
commit675ae92cb5cddf808e9bc563d417e036bf335637 (patch)
tree7edbccc84b463534b84f4114f256480d92683a0a /python/servo/bootstrap_commands.py
parent3bf9d6ee9eed7c3aa51dcec1506d2b714a7253ef (diff)
downloadservo-675ae92cb5cddf808e9bc563d417e036bf335637.tar.gz
servo-675ae92cb5cddf808e9bc563d417e036bf335637.zip
mach clean-nightlies: don’t remove everything versioned by date
(Dates contain `-`.)
Diffstat (limited to 'python/servo/bootstrap_commands.py')
-rw-r--r--python/servo/bootstrap_commands.py8
1 files 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))