Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[redis] Add automation #126

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
196 changes: 5 additions & 191 deletions releases/redis.json
Original file line number Diff line number Diff line change
@@ -1,193 +1,7 @@
{
"1.3.6": "2010-03-18",
"2.0.0": "2010-09-03",
"2.0.1": "2010-09-11",
"2.0.2": "2010-09-22",
"2.0.3": "2010-10-21",
"2.0.4": "2010-11-08",
"2.0.5": "2011-03-04",
"2.2.0": "2011-02-22",
"2.2.1": "2011-02-23",
"2.2.10": "2011-06-14",
"2.2.11": "2011-06-22",
"2.2.12": "2011-07-22",
"2.2.13": "2011-09-12",
"2.2.14": "2011-09-21",
"2.2.15": "2011-10-17",
"2.2.2": "2011-03-04",
"2.2.3": "2011-04-06",
"2.2.4": "2011-04-06",
"2.2.5": "2011-04-22",
"2.2.6": "2011-05-05",
"2.2.7": "2011-05-11",
"2.2.8": "2011-05-24",
"2.2.9": "2011-06-09",
"2.4.0": "2011-10-14",
"2.4.1": "2011-10-17",
"2.4.10": "2012-03-30",
"2.4.11": "2012-04-19",
"2.4.12": "2012-04-30",
"2.4.13": "2012-05-02",
"2.4.14": "2012-05-23",
"2.4.15": "2012-06-21",
"2.4.16": "2012-08-01",
"2.4.17": "2012-08-30",
"2.4.18": "2012-11-28",
"2.4.2": "2011-10-26",
"2.4.3": "2011-11-21",
"2.4.4": "2011-11-28",
"2.4.5": "2011-12-23",
"2.4.6": "2012-01-11",
"2.4.7": "2012-02-02",
"2.4.8": "2012-02-22",
"2.4.9": "2012-03-18",
"2.6.0": "2012-10-22",
"2.6.1": "2012-10-25",
"2.6.10": "2013-02-11",
"2.6.11": "2013-03-11",
"2.6.12": "2013-03-29",
"2.6.13": "2013-04-30",
"2.6.14": "2013-06-20",
"2.6.15": "2013-08-21",
"2.6.16": "2013-08-28",
"2.6.17": "2013-12-11",
"2.6.2": "2012-10-26",
"2.6.3": "2012-11-06",
"2.6.4": "2012-11-08",
"2.6.5": "2012-11-22",
"2.6.6": "2012-11-28",
"2.6.7": "2012-12-03",
"2.6.8": "2013-01-10",
"2.6.9": "2013-01-16",
"2.8.0": "2013-11-22",
"2.8.1": "2013-11-25",
"2.8.10": "2014-06-05",
"2.8.11": "2014-06-11",
"2.8.12": "2014-06-23",
"2.8.13": "2014-07-14",
"2.8.14": "2014-09-01",
"2.8.15": "2014-09-12",
"2.8.16": "2014-09-16",
"2.8.17": "2014-09-19",
"2.8.18": "2014-12-04",
"2.8.19": "2014-12-16",
"2.8.2": "2013-12-02",
"2.8.20": "2015-05-05",
"2.8.21": "2015-06-04",
"2.8.22": "2015-09-08",
"2.8.23": "2015-10-15",
"2.8.24": "2015-12-18",
"2.8.3": "2013-12-11",
"2.8.4": "2014-01-13",
"2.8.5": "2014-02-04",
"2.8.6": "2014-02-13",
"2.8.7": "2014-03-05",
"2.8.8": "2014-03-25",
"2.8.9": "2014-04-22",
"3.0.0": "2015-04-01",
"3.0.1": "2015-05-05",
"3.0.2": "2015-06-04",
"3.0.3": "2015-07-17",
"3.0.4": "2015-09-08",
"3.0.5": "2015-10-15",
"3.0.6": "2015-12-18",
"3.0.7": "2016-01-25",
"3.2.0": "2016-05-06",
"3.2.1": "2016-06-17",
"3.2.10": "2017-07-28",
"3.2.11": "2017-09-21",
"3.2.12": "2018-06-13",
"3.2.13": "2019-03-18",
"3.2.2": "2016-07-28",
"3.2.3": "2016-08-02",
"3.2.4": "2016-09-26",
"3.2.5": "2016-10-26",
"3.2.6": "2016-12-06",
"3.2.7": "2017-01-31",
"3.2.8": "2017-02-12",
"3.2.9": "2017-05-17",
"4.0.0": "2017-07-14",
"4.0.1": "2017-07-24",
"4.0.10": "2018-06-13",
"4.0.11": "2018-08-04",
"4.0.12": "2018-12-11",
"4.0.13": "2019-02-20",
"4.0.14": "2019-03-18",
"4.0.2": "2017-09-21",
"4.0.3": "2017-11-30",
"4.0.4": "2017-11-30",
"4.0.5": "2017-12-01",
"4.0.6": "2017-12-04",
"4.0.7": "2018-01-24",
"4.0.8": "2018-02-02",
"4.0.9": "2018-03-26",
"5.0.0": "2018-10-17",
"5.0.1": "2018-11-07",
"5.0.10": "2020-10-27",
"5.0.11": "2021-02-22",
"5.0.12": "2021-03-02",
"5.0.13": "2021-07-21",
"5.0.14": "2021-10-04",
"5.0.2": "2018-11-22",
"5.0.3": "2018-12-12",
"5.0.4": "2019-03-18",
"5.0.5": "2019-05-15",
"5.0.6": "2019-09-25",
"5.0.7": "2019-11-19",
"5.0.8": "2020-03-12",
"5.0.9": "2020-04-17",
"6.0.0": "2020-04-30",
"6.0.1": "2020-05-02",
"6.0.10": "2021-01-12",
"6.0.11": "2021-02-23",
"6.0.12": "2021-03-02",
"6.0.13": "2021-05-03",
"6.0.14": "2021-06-01",
"6.0.15": "2021-07-21",
"6.0.16": "2021-10-04",
"6.0.17": "2023-01-17",
"6.0.18": "2023-02-28",
"6.0.19": "2023-04-17",
"6.0.2": "2020-05-15",
"6.0.20": "2023-07-10",
"6.0.3": "2020-05-16",
"6.0.4": "2020-05-28",
"6.0.5": "2020-06-09",
"6.0.6": "2020-07-20",
"6.0.7": "2020-09-01",
"6.0.8": "2020-09-10",
"6.0.9": "2020-10-27",
"6.2.0": "2021-02-22",
"6.2.1": "2021-03-02",
"6.2.10": "2023-01-17",
"6.2.11": "2023-02-28",
"6.2.12": "2023-04-17",
"6.2.13": "2023-07-10",
"6.2.2": "2021-04-20",
"6.2.3": "2021-05-03",
"6.2.4": "2021-06-01",
"6.2.5": "2021-07-21",
"6.2.6": "2021-10-04",
"6.2.7": "2022-04-27",
"6.2.8": "2022-12-12",
"6.2.9": "2023-01-16",
"7.0.0": "2022-04-27",
"7.0.1": "2022-06-08",
"7.0.10": "2023-03-20",
"7.0.11": "2023-04-17",
"7.0.12": "2023-07-10",
"7.0.2": "2022-06-12",
"7.0.3": "2022-07-11",
"7.0.4": "2022-07-18",
"7.0.5": "2022-09-21",
"7.0.6": "2022-12-12",
"7.0.7": "2022-12-16",
"7.0.8": "2023-01-16",
"7.0.9": "2023-02-28",
"1.3.10": "2010-04-21",
"1.3.11": "2010-05-06",
"1.3.12": "2010-05-16",
"1.3.7": "2010-03-22",
"1.3.8": "2010-03-29",
"1.3.9": "2010-04-16"
"6.2": "2024-08-31",
"6.0": "2022-05-31",
"5.6": "2021-10-31",
"5.4": "2020-12-31",
"5.2": "2019-12-31"
}
31 changes: 31 additions & 0 deletions src/redis.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import datetime
from bs4 import BeautifulSoup
from common import endoflife
from datetime import datetime


URLS = [
"https://docs.redis.com/latest/rs/installing-upgrading/product-lifecycle/"
]


def parse():
all_versions = {}
print("::group::redis")
for url in URLS:
response = endoflife.fetch_url(url)
soup = BeautifulSoup(response, features="html5lib")
for tr in soup.select("table")[0].findAll("tr")[1:]:
td_list = tr.findAll("td")
# split on En Dash unicode U+2013
version = td_list[0].get_text().strip().split("–")[0].strip()
date_text = td_list[1].get_text().strip()
if len(date_text) > 1:
d = datetime.strptime(date_text, "%B %d, %Y").strftime("%Y-%m-%d")
all_versions[version] = d
print(f"{version}: {d}")
print("::endgroup::")
return all_versions

versions = parse()
endoflife.write_releases('redis', versions)