Skip to content

Commit

Permalink
fix: Treat servicing builds as stable
Browse files Browse the repository at this point in the history
These builds will choose the stable workload manifests instead of the
`.rc` or `.preview` builds.
  • Loading branch information
trungnt2910 authored Jan 5, 2024
1 parent 46876b1 commit df62cdd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
10 changes: 9 additions & 1 deletion cake/TargetEnvironment.cake
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,16 @@ class TargetEnvironment
{
secondDot = dotnetVersion.Length;
}
DotNetCliFeatureBand = dotnetVersion.Substring(0, secondDot);
DotNetCliFeatureBandWithoutPreview = dotnetVersion.Substring(0, prereleaseStart);
var prereleaseKind = dotnetVersion.Substring(prereleaseStart + 1, firstDot - prereleaseStart - 1);
if (prereleaseKind == "servicing")
{
DotNetCliFeatureBand = dotnetVersion.Substring(0, prereleaseStart - 2) + "00";
}
else
{
DotNetCliFeatureBand = dotnetVersion.Substring(0, secondDot);
}
}
else
{
Expand Down
8 changes: 7 additions & 1 deletion install-manifest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@ if [ "$prereleaseStart" -gt 0 ]; then
secondDot=$(($secondDot + $firstDot))
fi

DOTNET_FEATURE_BAND="${DOTNET_VERSION:0:$secondDot}"
prereleaseKind="${DOTNET_VERSION:$((prereleaseStart + 1)):$((firstDot - prereleaseStart - 1))}"

if [ "$prereleaseKind" = "servicing" ]; then
DOTNET_FEATURE_BAND="${DOTNET_VERSION:0:$((prereleaseStart - 2))}00"
else
DOTNET_FEATURE_BAND="${DOTNET_VERSION:0:$secondDot}"
fi
else
DOTNET_FEATURE_BAND="${DOTNET_VERSION:0:$((${#DOTNET_VERSION} - 2))}00"
fi
Expand Down

0 comments on commit df62cdd

Please sign in to comment.