diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index c9484d13..5f4b4ba7 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -45,6 +45,7 @@ jobs: git config --global extensions.partialClone true pip install -r requirements.txt python src/unrealircd.py + python src/haproxy.py bundle exec ruby update.rb ./website ~/.cache releases id: update_releases - uses: stefanzweifel/git-auto-commit-action@v4 diff --git a/src/haproxy.py b/src/haproxy.py index 7cd4c3a6..d7a30659 100644 --- a/src/haproxy.py +++ b/src/haproxy.py @@ -2,6 +2,8 @@ import json 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.?)$' @@ -14,5 +16,5 @@ with urllib.request.urlopen(URL) as response: abs_date = "%s-%s-%s" % (year, month, date) list[abs_date] = version -with open('releases/custom/haproxy.json', 'w') as f: +with open('releases/haproxy.json', 'w') as f: f.write(json.dumps(list, indent=2)) diff --git a/src/unrealircd.py b/src/unrealircd.py index 56770395..77da95af 100644 --- a/src/unrealircd.py +++ b/src/unrealircd.py @@ -20,5 +20,5 @@ with urllib.request.urlopen(URL) as response: list[maybe_version] = maybe_date -with open('releases/custom/unrealircd.json', 'w') as f: +with open('releases/unrealircd.json', 'w') as f: f.write(json.dumps(list, indent=2))