Revision 27e7a3355f455fe70ed38aaf785ff0bd213a07da authored by Mohamed Barakat on 28 June 2021, 12:30:24 UTC, committed by Mohamed Barakat on 28 June 2021, 12:30:24 UTC
1 parent 561c3cf
delete_old_releases.py
import sys
import json
from json import *
package_name=sys.argv[1]
json_data_file=sys.argv[2]
with open(json_data_file) as data_file:
data=json.load(data_file)
number_releases=len(data)
package_releases=[ [ data[i]["id"], data[i]["created_at"] ] for i in range(number_releases) if data[i]["name"].startswith(package_name) ]
package_releases.sort(key=lambda x:x[1])
if len(package_releases) > 2:
package_releases=package_releases[:len(package_releases)-2]
for i in range(len(package_releases)):
print(package_releases[i][0]," ")
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...