mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +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)
|
full_path = path.join(base, name)
|
||||||
if name.startswith("rust-"):
|
if name.startswith("rust-"):
|
||||||
name = name[len("rust-"):]
|
name = name[len("rust-"):]
|
||||||
# We append `-alt` if LLVM assertions aren't enabled,
|
if name.endswith("-alt"):
|
||||||
# so use just the commit hash itself.
|
name = name[:-len("-alt")]
|
||||||
# This may occasionally leave an extra nightly behind
|
if name not in to_keep:
|
||||||
# but won't remove too many nightlies.
|
|
||||||
if name.partition('-')[0] not in to_keep:
|
|
||||||
removing_anything = True
|
removing_anything = True
|
||||||
if force:
|
if force:
|
||||||
print("Removing {}".format(full_path))
|
print("Removing {}".format(full_path))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue