Files
endoflife-date-release-data/src/rocky-linux.py
Marc Wrobel 90986aa946 [rocky-linux] Fix script for future releases (#538)
Future releases may be declared in the table with a year-month date, ignoring those release.
2025-11-30 10:53:25 +01:00

18 lines
682 B
Python

import logging
from common import dates, http
from common.releasedata import ProductData, config_from_argv
config = config_from_argv()
with ProductData(config.product) as product_data:
response = http.fetch_url(config.url)
for line in response.text.strip().split('\n'):
items = line.split('|')
if len(items) >= 5 and config.first_match(items[1].strip()):
version = items[1].strip()
try:
date = dates.parse_date(items[3])
product_data.declare_version(version, date)
except Exception as e:
logging.exception(f"Could not process release {version} for {config.product}: {e}")