Revision fa3116d5f0209e1f1c23ab826e63156ed755ca57 authored by Fabian Zickgraf on 14 March 2022, 09:41:09 UTC, committed by Fabian Zickgraf on 14 March 2022, 09:41:09 UTC
1 parent b134331
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 ...