mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
mach clean-nightlies: don’t remove everything versioned by date
(Dates contain `-`.)
This commit is contained in:
parent
3bf9d6ee9e
commit
675ae92cb5
1 changed files with 3 additions and 5 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue