Skip to content

Commit

Permalink
use releases instead of versions
Browse files Browse the repository at this point in the history
  • Loading branch information
marcwrobel committed Aug 2, 2024
1 parent 757ed24 commit 464ca5c
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/kuma.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
import yaml
from common import dates, http, releasedata
from common.git import Git

"""Fetch version data for Kuma from https://raw.githubusercontent.com/kumahq/kuma/master/versions.yml
"""

with releasedata.ProductData("kuma") as product_data:
yml_response = http.fetch_url("https://raw.githubusercontent.com/kumahq/kuma/master/versions.yml")
versions_data = yaml.safe_load(yml_response.text)

# Iterate through the versions and their associated dates
for version_info in versions_data:
if 'version' in version_info and 'releaseDate' in version_info:
version = version_info['version']
release_name = version_info['release'].replace('.x', '')
release = product_data.get_release(release_name)

release_date_str = version_info['releaseDate']
release_date = dates.parse_date(release_date_str)
release.set_field('releaseDate', release_date)

date_str = version_info['releaseDate']
date = dates.parse_date(date_str)

product_data.declare_version(version, date)
eol_str = version_info['endOfLifeDate']
eol = dates.parse_date(eol_str)
release.set_field('eol', eol)

0 comments on commit 464ca5c

Please sign in to comment.