-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDirectory.Build.targets
More file actions
20 lines (17 loc) · 863 Bytes
/
Copy pathDirectory.Build.targets
File metadata and controls
20 lines (17 loc) · 863 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<Project>
<!--
Build Thunderstore package by calling `dotnet build -c Release -target:PackTS -v d` (verbosity detailed).
Publish to Thunderstore by including `-property:PublishTS=true` in the command.
-->
<Target Name="PackTS" DependsOnTargets="Build">
<CallTarget Targets="PackTS_Execute" Condition="'$(ThunderstorePackable)' == 'true' and '$(Configuration)' == 'Release'" />
</Target>
<Target Name="PackTS_Execute">
<PropertyGroup>
<BuildArgument Condition="'$(PublishTS)' != 'true'">build</BuildArgument>
<BuildArgument Condition="'$(PublishTS)' == 'true'">publish</BuildArgument>
</PropertyGroup>
<Exec Command="dotnet tool restore" WorkingDirectory="$(SolutionDir)" />
<Exec Command="dotnet tcli $(BuildArgument) --package-version $(Version)" WorkingDirectory="$(SolutionDir)" />
</Target>
</Project>