ED_LRR/rust/rustup_check.py
2020-06-18 12:31:25 +02:00

19 lines
479 B
Python

import subprocess as SP
import os
from datetime import timedelta
from datetime import datetime
dt = timedelta(days=1)
d = datetime.today().date()
while True:
toolchain="nightly-{}".format(d.isoformat())
ret = os.system(
f"rustup default {toolchain}"
)
if ret==0:
os.system("cargo +{} clean".format(toolchain))
if os.system("cargo +{} check".format(toolchain))==0:
print(d)
break
d = d - dt