mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
Complete nightly scripts update to new b2 cli version
This commit is contained in:
@@ -12,7 +12,6 @@ def main():
|
||||
print(f"Looking for binaries to delete older than {days_to_keep} days")
|
||||
|
||||
files_lines = execute_cli(f"b2 ls --long --versions b2://{bucket}/nightly/").split("\n")
|
||||
print(files_lines)
|
||||
for x in files_lines:
|
||||
parts = [y for y in x.split(' ') if y]
|
||||
|
||||
@@ -23,7 +22,7 @@ def main():
|
||||
|
||||
if delta.days > days_to_keep:
|
||||
print(f'Deleting {parts[5]}')
|
||||
execute_cli(f'b2 delete-file-version {parts[0]}')
|
||||
execute_cli(f'b2 rm {parts[0]}')
|
||||
|
||||
|
||||
def execute_cli(command):
|
||||
@@ -31,5 +30,4 @@ def execute_cli(command):
|
||||
return sb.stdout.read().decode("utf-8");
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
||||
|
||||
sys.exit(main())
|
||||
Reference in New Issue
Block a user