From 869a866e7efb115d8f198a5bbe50662d3b9b986c Mon Sep 17 00:00:00 2001 From: Nemo Date: Tue, 24 May 2022 18:09:14 +0530 Subject: [PATCH] Switch haproxy to all changelogs --- .github/workflows/update.yml | 3 +- releases/haproxy.json | 128 ++++++++++++++++++++++++++++++++--- src/haproxy.py | 20 +++--- 3 files changed, 132 insertions(+), 19 deletions(-) diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index d0501514..942e113f 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -23,7 +23,8 @@ jobs: with: path: ~/.cache # The cache is reset on the first build of every week this way. - key: "${{ steps.current-time.outputs.formattedTime }}" + # Change the -1 part if you need to force reset the cache + key: "${{ steps.current-time.outputs.formattedTime }}-1" - uses: actions/checkout@v3 name: Clone self repository with: diff --git a/releases/haproxy.json b/releases/haproxy.json index fff9a618..ca074590 100644 --- a/releases/haproxy.json +++ b/releases/haproxy.json @@ -1,12 +1,18 @@ { - "2021-11-23": "2.5.0", - "2021-05-14": "2.4.0", - "2020-11-05": "2.3.0", - "2020-07-07": "2.2.0", - "2019-11-25": "2.1.0", - "2019-06-16": "2.0.0", - "2018-12-19": "1.9.0", - "2017-11-26": "1.8.0", + "2021-03-31": "2.2.12", + "2021-03-19": "1.8.29", + "2019-10-25": "1.8.22", + "2018-04-30": "1.7.11", + "2018-01-02": "1.7.10", + "2017-08-18": "1.7.9", + "2017-07-07": "1.7.8", + "2017-06-25": "1.7.7", + "2017-06-16": "1.7.6", + "2017-04-03": "1.7.5", + "2017-03-27": "1.7.4", + "2017-02-28": "1.7.3", + "2017-01-13": "1.7.2", + "2016-12-13": "1.7.1", "2016-11-25": "1.7.0", "2015-10-13": "1.6.0", "2014-06-19": "1.5.0", @@ -73,5 +79,109 @@ "2002-03-22": "1.1.3", "2002-03-21": "1.1.2", "2002-03-12": "1.1.1", - "2002-03-10": "1.1.0" + "2002-03-10": "1.1.0", + "2021-04-12": "2.0.22", + "2021-01-13": "2.3.4", + "2020-11-06": "2.0.19", + "2020-08-03": "1.8.26", + "2020-04-02": "2.1.4", + "2020-02-15": "1.8.24", + "2019-11-25": "2.1.0", + "2019-08-16": "2.0.5", + "2019-04-25": "1.9.7", + "2019-02-11": "1.8.19", + "2019-02-06": "1.9.4", + "2019-01-08": "1.9.1", + "2018-12-21": "1.8.16", + "2018-12-13": "1.8.15", + "2018-09-20": "1.8.14", + "2018-07-30": "1.8.13", + "2018-06-27": "1.8.12", + "2018-06-26": "1.8.11", + "2018-06-22": "1.8.10", + "2018-05-18": "1.8.9", + "2018-04-19": "1.8.8", + "2018-04-07": "1.8.7", + "2018-04-05": "1.8.6", + "2018-03-23": "1.8.5", + "2018-02-08": "1.8.4", + "2017-12-30": "1.8.3", + "2017-12-23": "1.8.2", + "2017-12-03": "1.8.1", + "2017-11-26": "1.8.0", + "2020-07-31": "2.2.2", + "2020-02-13": "2.0.13", + "2019-10-24": "1.9.12", + "2019-09-27": "2.0.7", + "2019-08-08": "1.9.10", + "2019-07-23": "2.0.3", + "2019-05-13": "1.9.8", + "2019-03-29": "1.9.6", + "2019-03-19": "1.9.5", + "2019-01-29": "1.9.3", + "2019-01-16": "1.9.2", + "2018-12-19": "1.9.0", + "2022-05-13": "2.5.7", + "2022-03-14": "2.5.5", + "2022-01-26": "2.0.27", + "2021-12-03": "2.0.26", + "2021-09-07": "2.4.4", + "2021-08-17": "2.4.3", + "2021-07-16": "2.2.15", + "2021-03-18": "2.2.11", + "2021-01-08": "2.3.3", + "2020-09-30": "2.2.4", + "2020-07-17": "2.0.16", + "2020-06-12": "2.0.15", + "2019-12-21": "2.1.2", + "2019-12-11": "2.1.1", + "2019-11-15": "2.0.9", + "2019-10-23": "2.0.8", + "2019-09-13": "2.0.6", + "2019-08-06": "2.0.4", + "2019-07-16": "2.0.2", + "2019-06-26": "2.0.1", + "2019-06-16": "2.0.0", + "2020-11-05": "2.3.0", + "2020-06-09": "2.1.7", + "2020-06-08": "2.1.6", + "2020-05-29": "2.1.5", + "2020-02-12": "2.1.3", + "2022-05-06": "2.2.23", + "2022-03-02": "2.3.18", + "2022-01-12": "2.2.20", + "2021-11-29": "2.2.19", + "2021-11-05": "2.2.18", + "2021-04-29": "2.2.14", + "2021-04-02": "2.2.13", + "2021-03-03": "2.3.6", + "2021-02-06": "2.3.5", + "2020-11-30": "2.2.6", + "2020-09-08": "2.2.3", + "2020-07-23": "2.2.1", + "2020-07-07": "2.2.0", + "2022-04-29": "2.4.16", + "2022-01-11": "2.5.1", + "2021-11-24": "2.4.9", + "2021-11-04": "2.3.15", + "2021-07-08": "2.3.12", + "2021-07-07": "2.4.2", + "2021-04-23": "2.3.10", + "2021-03-30": "2.3.9", + "2021-03-25": "2.3.8", + "2021-03-16": "2.3.7", + "2020-11-28": "2.3.2", + "2020-11-13": "2.3.1", + "2022-02-25": "2.5.4", + "2022-02-16": "2.5.2", + "2022-01-07": "2.4.11", + "2021-12-23": "2.4.10", + "2021-11-03": "2.4.8", + "2021-10-04": "2.4.6", + "2021-10-01": "2.4.5", + "2021-06-17": "2.4.1", + "2021-05-14": "2.4.0", + "2022-04-26": "2.5.6", + "2022-02-18": "2.5.3", + "2021-11-23": "2.5.0" } \ No newline at end of file diff --git a/src/haproxy.py b/src/haproxy.py index d7a30659..13293da6 100644 --- a/src/haproxy.py +++ b/src/haproxy.py @@ -3,18 +3,20 @@ import re import urllib.request # https://regex101.com/r/1JCnFC/1 - -URL = "https://www.haproxy.org/download/2.6/src/CHANGELOG" REGEX = r'^(\d{4})\/(\d{2})\/(\d{2})\s+:\s+(\d+\.\d+\.\d.?)$' list = {} -with urllib.request.urlopen(URL) as response: - for line in response: - m = re.match(REGEX, line.decode('utf-8')) - if m: - year,month,date,version = m.groups() - abs_date = "%s-%s-%s" % (year, month, date) - list[abs_date] = version + +for i in range(17, 27): + url = "https://www.haproxy.org/download/%s/src/CHANGELOG" % (i/10) + print(url) + with urllib.request.urlopen(url) as response: + for line in response: + m = re.match(REGEX, line.decode('utf-8')) + if m: + year,month,date,version = m.groups() + abs_date = "%s-%s-%s" % (year, month, date) + list[abs_date] = version with open('releases/haproxy.json', 'w') as f: f.write(json.dumps(list, indent=2))