mirror of
https://github.com/cupcakearmy/docker-static.git
synced 2024-12-21 07:46:30 +00:00
get latest version
This commit is contained in:
parent
22fbf4b955
commit
574c2b7b87
@ -14,8 +14,8 @@ const clean = (match) => match.replace(/"/g, '').replace('/download/nginx-', '')
|
|||||||
const versions = matches.map(clean)
|
const versions = matches.map(clean)
|
||||||
|
|
||||||
// Filter
|
// Filter
|
||||||
const MIN_VERSION = '1.20.0'
|
// Get the two most up to date versions, mainline and stable
|
||||||
const filtered = versions.filter((v) => semver.gte(v, MIN_VERSION))
|
const filtered = versions.sort(semver.rcompare).slice(0, 2)
|
||||||
|
|
||||||
// Map the docker tags to the versions
|
// Map the docker tags to the versions
|
||||||
const tagsMap = Object.fromEntries(filtered.map((v) => [v, v]))
|
const tagsMap = Object.fromEntries(filtered.map((v) => [v, v]))
|
||||||
|
Loading…
Reference in New Issue
Block a user