mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-23 19:49:43 +01:00
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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user