From c5240d9775abf5ae48cc792048ef6966c719aeae Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Fri, 14 Jul 2023 17:29:10 -0700 Subject: [PATCH] asterisk: update the update script version regex --- pkgs/servers/asterisk/update.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/asterisk/update.py b/pkgs/servers/asterisk/update.py index 905f396284ca..1e5029416938 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 = {}