Use a default regex when possible (#205)

This commit is contained in:
Marc Wrobel
2023-12-01 21:08:11 +01:00
parent e97e261946
commit 750faaa64f
10 changed files with 20 additions and 35 deletions

View File

@@ -4,7 +4,6 @@ import sys
from common import endoflife
METHOD = "npm"
REGEX = r"^(?:(\d+\.(?:\d+\.)*\d+))$"
def fetch_releases(npm_id, regex):
@@ -34,7 +33,7 @@ def update_product(product_name, configs):
versions = {}
for config in configs:
config = {"regex": REGEX} | config
config = {"regex": endoflife.DEFAULT_VERSION_REGEX} | config
versions = versions | fetch_releases(config[METHOD], config["regex"])
endoflife.write_releases(product_name, versions)