From 31f01aedc74efd72102719ac71d6bead8ffc29d4 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 28 Apr 2022 14:59:24 +0200 Subject: [PATCH] Get only LTS Node versions from node-versions manifest file (#53) * Get only LTS Node versions from manifest * Minor fix --- .../verify-added-to-image/verify-common-tool-parser.psm1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/get-new-tool-versions/parsers/verify-added-to-image/verify-common-tool-parser.psm1 b/get-new-tool-versions/parsers/verify-added-to-image/verify-common-tool-parser.psm1 index 3723390..977ad12 100644 --- a/get-new-tool-versions/parsers/verify-added-to-image/verify-common-tool-parser.psm1 +++ b/get-new-tool-versions/parsers/verify-added-to-image/verify-common-tool-parser.psm1 @@ -8,8 +8,10 @@ function Search-ToolsVersionsNotOnImage { $stableReleases = (Invoke-RestMethod $ReleasesUrl) | Where-Object stable -eq $true $stableReleaseVersions = $stableReleases | ForEach-Object { - if ($ToolName -eq "Node") { - $_.$FilterParameter.split(".")[0] + ".0" + if ($ToolName -eq "Node") { + if ($_.lts) { + $_.$FilterParameter.split(".")[0] + ".0" + } } else { $_.$FilterParameter.split(".")[0,1] -join"." }