fix(build): use case-insensitive comparison for BuildTests property

YAML boolean parameters resolve to 'True'/'False' (Pascal case), but the
original condition checked for lowercase 'false' only. This caused the
skip logic to not work correctly in CI/release pipelines.

Using .ToLower() ensures the comparison works regardless of case.
This commit is contained in:
vanzue
2026-01-31 14:37:41 +08:00
parent bccbf4e103
commit b81501acf4

View File

@@ -25,8 +25,9 @@
Match: projects ending in Test, Tests, UnitTests, UITests, FuzzTests, or in a folder named Tests.
Also matches projects starting with UnitTests- (e.g., UnitTests-CommonLib).
Also removes all PackageReference/ProjectReference to prevent NuGet restore and dependency builds.
Note: Using case-insensitive comparison for BuildTests (handles 'false', 'False', 'FALSE').
-->
<PropertyGroup Condition="'$(BuildTests)' == 'false'">
<PropertyGroup Condition="'$(BuildTests.ToLower())' == 'false'">
<_ProjectName>$(MSBuildProjectName)</_ProjectName>
<!-- Match any project ending with "Test" or "Tests" (covers UnitTests, UITests, FuzzTests, etc.) -->
<_IsSkippedTestProject Condition="$(_ProjectName.EndsWith('Test'))">true</_IsSkippedTestProject>