aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/bootstrap_commands.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/servo/bootstrap_commands.py')
-rw-r--r--python/servo/bootstrap_commands.py15
1 files changed, 6 insertions, 9 deletions
diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py
index 1d103fe5aca..18653c9d4da 100644
--- a/python/servo/bootstrap_commands.py
+++ b/python/servo/bootstrap_commands.py
@@ -128,18 +128,15 @@ class MachCommands(CommandBase):
help='Keep up to this many most recent nightlies')
def clean_nightlies(self, force=False, keep=None):
default_toolchain = self.default_toolchain()
- geckolib_toolchain = self.geckolib_toolchain()
print("Current Rust version for Servo: {}".format(default_toolchain))
- print("Current Rust version for geckolib: {}".format(geckolib_toolchain))
old_toolchains = []
keep = int(keep)
- for toolchain_file in ['rust-toolchain', 'geckolib-rust-toolchain']:
- stdout = subprocess.check_output(['git', 'log', '--format=%H', toolchain_file])
- for i, commit_hash in enumerate(stdout.split(), 1):
- if i > keep:
- toolchain = subprocess.check_output(
- ['git', 'show', '%s:%s' % (commit_hash, toolchain_file)])
- old_toolchains.append(toolchain.strip())
+ stdout = subprocess.check_output(['git', 'log', '--format=%H', 'rust-toolchain'])
+ for i, commit_hash in enumerate(stdout.split(), 1):
+ if i > keep:
+ toolchain = subprocess.check_output(
+ ['git', 'show', '%s:rust-toolchain' % commit_hash])
+ old_toolchains.append(toolchain.strip())
removing_anything = False
stdout = subprocess.check_output(['rustup', 'toolchain', 'list'])