[artifactory] Refactor script (#214)

Make the script more readable, mostly by:

- using the endoflife.Product class,
- removing the unnecessary use of functions,
- a little bit of renaming.
This commit is contained in:
Marc Wrobel
2023-12-10 14:14:03 +01:00
committed by GitHub
parent b122ed40fe
commit 758b204ada
4 changed files with 22 additions and 35 deletions

View File

@@ -74,7 +74,8 @@ for product_name in VERSION_PATTERNS.keys():
logging.info(f"ignoring version {version_text} ({date_text}), date pattern don't match")
continue
date = dates.parse_date(date_match.group(0))
date_str = date_match.group(0).replace("Sept ", "Sep ")
date = dates.parse_date(date_str)
for version_pattern in VERSION_PATTERNS[product.name]:
for version in version_pattern.findall(version_text):
if not product.has_version(version):