Files
endoflife-date-release-data/src/red-hat-jboss-eap-8.py
Marc Wrobel 391d65ad8a Simplify argument parsing (#459)
With the current state of automation scripts, this is not possible anymore to launch script with multiple auto configs.
2025-07-06 22:42:01 +02:00

21 lines
752 B
Python

import re
from common import dates, http
from common.releasedata import ProductData, config_from_argv
"""Fetches the latest RedHat JBoss EAP version data for JBoss 8.0"""
config = config_from_argv()
with ProductData(config.product) as product_data:
xml = http.fetch_xml(config.url)
versioning = xml.getElementsByTagName("metadata")[0].getElementsByTagName("versioning")[0]
latest_str = versioning.getElementsByTagName("latest")[0].firstChild.nodeValue
latest_name = "8.0." + re.match(r"^..(.*)\.GA", latest_str).group(1)
latest_date_str = versioning.getElementsByTagName("lastUpdated")[0].firstChild.nodeValue
latest_date = dates.parse_datetime(latest_date_str)
product_data.declare_version(latest_name, latest_date)