From 574c2b7b870ecdf1a1e8db2de5b816e618cc52b6 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Tue, 1 Nov 2022 21:31:31 +0100 Subject: [PATCH] get latest version --- tags/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tags/index.js b/tags/index.js index fcfeed6..10f8c35 100644 --- a/tags/index.js +++ b/tags/index.js @@ -14,8 +14,8 @@ const clean = (match) => match.replace(/"/g, '').replace('/download/nginx-', '') const versions = matches.map(clean) // Filter -const MIN_VERSION = '1.20.0' -const filtered = versions.filter((v) => semver.gte(v, MIN_VERSION)) +// Get the two most up to date versions, mainline and stable +const filtered = versions.sort(semver.rcompare).slice(0, 2) // Map the docker tags to the versions const tagsMap = Object.fromEntries(filtered.map((v) => [v, v]))