diff options
author | Yorick <yorick@yorickvanpelt.nl> | 2023-07-15 15:54:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-15 15:54:53 +0200 |
commit | fc66814d6f1ce6eb8cbe8787592414df686ad35d (patch) | |
tree | 7202fdae47ccbb9df3a9fcf6aecbe36e6b148fa3 /pkgs/servers/asterisk | |
parent | 84a29b48727272516895f997c0781d3ac8906e07 (diff) | |
parent | c5240d9775abf5ae48cc792048ef6966c719aeae (diff) |
Merge pull request #243563 from tjni/asterisk-update-fix
asterisk: update the update script version regex
Diffstat (limited to 'pkgs/servers/asterisk')
-rwxr-xr-x | pkgs/servers/asterisk/update.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/servers/asterisk/update.py b/pkgs/servers/asterisk/update.py index 905f396284cac..1e50294169385 100755 --- a/pkgs/servers/asterisk/update.py +++ b/pkgs/servers/asterisk/update.py @@ -7,14 +7,14 @@ import re, requests, json import os, sys from pathlib import Path -URL = "https://downloads.asterisk.org/pub/telephony/asterisk" +URL = "https://downloads.asterisk.org/pub/telephony/asterisk/" page = requests.get(URL) -changelog = re.compile("^ChangeLog-\d+\.\d+\.\d+$") +changelog = re.compile("^ChangeLog-\d+\.\d+\.\d+\.md$") changelogs = [a.get_text() for a in BeautifulSoup(page.text, 'html.parser').find_all('a') if changelog.match(a.get_text())] major_versions = {} for changelog in changelogs: - v = version.parse(changelog.removeprefix("ChangeLog-")) + v = version.parse(changelog.removeprefix("ChangeLog-").removesuffix(".md")) major_versions.setdefault(v.major, []).append(v) out = {} |