Skip to content

Commit

Permalink
Fixed dotnet version check filter non version output for Strawberry S…
Browse files Browse the repository at this point in the history
…hake (#6699)
  • Loading branch information
tnc1997 authored and michaelstaib committed Nov 21, 2023
1 parent f976747 commit a7380c8
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@

<Target Name="_ParseVersion">
<Exec Command="dotnet --version" StandardOutputImportance="Low" ConsoleToMsBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="DotNetVersion" />
<Output TaskParameter="ConsoleOutput" ItemName="DotNetVersion" />
</Exec>

<PropertyGroup>
<DotNetVersion Condition="$([System.Text.RegularExpressions.Regex]::Match(%(Identity),'^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$').Success)">@(DotNetVersion)</DotNetVersion>
</PropertyGroup>
</Target>

<Target
Expand Down

0 comments on commit a7380c8

Please sign in to comment.