-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathafter.brighid-commands-resources.sln.targets
39 lines (35 loc) · 1.4 KB
/
after.brighid-commands-resources.sln.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<Project>
<Target Name="RestoreTools" AfterTargets="Restore">
<Exec
Command="dotnet json --help"
ConsoleToMsBuild="true"
StandardOutputImportance="Low"
StandardErrorImportance="Low"
IgnoreExitCode="true"
>
<Output TaskParameter="ExitCode" PropertyName="Tool_JSON_ExitCode" />
</Exec>
<Exec
Command="dotnet nbgv --help"
ConsoleToMsBuild="true"
StandardOutputImportance="Low"
StandardErrorImportance="Low"
IgnoreExitCode="true"
>
<Output TaskParameter="ExitCode" PropertyName="Tool_NBGV_ExitCode" />
</Exec>
<Exec
Command="dotnet tool restore"
ConsoleToMsBuild="true"
Condition="$(Tool_JSON_ExitCode) != '0' or $(Tool_NBGV_ExitCode) != '0'"
/>
</Target>
<Target Name="Format" DependsOnTargets="Restore;RestoreTools">
<Exec Command="dotnet format $(MSBuildThisFileDirectory)brighid-commands-resources.sln --fix-style info" />
</Target>
<Target Name="RetrievePackageVersionFromTool" DependsOnTargets="RestoreTools">
<Exec Command="dotnet nbgv get-version -v NuGetPackageVersion" ConsoleToMsBuild="true" StandardOutputImportance="Low">
<Output TaskParameter="ConsoleOutput" PropertyName="PackageVersion" />
</Exec>
</Target>
</Project>