From 63bd7df0f2407c6dc2c56cd06c56f40aaa30c5ed Mon Sep 17 00:00:00 2001 From: Maria Zhelezova <43066499+mazhelez@users.noreply.github.com> Date: Tue, 3 Dec 2024 13:22:18 +0100 Subject: [PATCH] Limit the minor version for baselines to 5 (#2438) Limit the minor version for baselines to 5 to avoid updating the baseline to a version that is not released for SaaS. 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 3015c32a5a..320fb65273 100644 --- a/build/scripts/EnlistmentHelperFunctions.psm1 +++ b/build/scripts/EnlistmentHelperFunctions.psm1 @@ -237,7 +237,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)" }