From 9996a6cd4535c257e73edbdefc4c0fa3af129935 Mon Sep 17 00:00:00 2001 From: Maria Zhelezova <43066499+mazhelez@users.noreply.github.com> Date: Wed, 4 Dec 2024 15:34:35 +0100 Subject: [PATCH] [releases/24.x] Limit the minor version for baselines to 5 (#2440) This pull request backports #2438 to releases/24.x Fixes [AB#555469](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/555469) --- build/scripts/EnlistmentHelperFunctions.psm1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/scripts/EnlistmentHelperFunctions.psm1 b/build/scripts/EnlistmentHelperFunctions.psm1 index 37607e1132..aff3c860c4 100644 --- a/build/scripts/EnlistmentHelperFunctions.psm1 +++ b/build/scripts/EnlistmentHelperFunctions.psm1 @@ -158,7 +158,7 @@ function Get-PackageLatestVersion() { if ($PackageName -eq "AppBaselines-BCArtifacts") { # For app baselines, use the previous minor version as minimum version if ($majorMinorVersion.Minor -gt 0) { - $minimumVersion = "$($majorMinorVersion.Major).$($majorMinorVersion.Minor - 1)" + $minimumVersion = "$($majorMinorVersion.Major).$([Math]::Min($majorMinorVersion.Minor - 1, 5))" # limit the minor version to 5, as it is the maximum minor version for SaaS } else { $minimumVersion = "$($majorMinorVersion.Major - 1)" }