-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathafter.brighid-commands-client.sln.targets
48 lines (42 loc) · 1.87 KB
/
after.brighid-commands-client.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
40
41
42
43
44
45
46
47
48
<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="UpdateSwagger">
<MSBuild Projects="$(MSBuildThisFileDirectory)src/Client/Client.csproj" Targets="DownloadSwaggerDoc" Properties="SwaggerFileSourceUrl=$(SwaggerFileSourceUrl)" />
</Target>
<Target Name="Format" DependsOnTargets="Restore;RestoreTools">
<Exec Command="dotnet format $(MSBuildThisFileDirectory)brighid-commands-client.sln --fix-style info" />
</Target>
<Target Name="RetrievePackageVersionFromTool" DependsOnTargets="RestoreTools" AfterTargets="Build" Condition="'$(DesignTimeBuild)' != 'true'">
<Exec Command="dotnet nbgv get-version -v NuGetPackageVersion" ConsoleToMsBuild="true" StandardOutputImportance="Low">
<Output TaskParameter="ConsoleOutput" PropertyName="PackageVersion" />
</Exec>
<WriteLinesToFile
File="$(GITHUB_OUTPUT)"
Condition="'$(GITHUB_OUTPUT)' != '' and Exists('$(GITHUB_OUTPUT)')"
Lines="version=$(PackageVersion)" />
</Target>
</Project>