Skip to content

Commit

Permalink
Allow the dry tcli build parameter to output a package file
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaggy1024 authored and mattymatty97 committed Dec 10, 2024
1 parent a4cba6e commit 8f12d15
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
</PropertyGroup>

<Target Name="Upload" AfterTargets="AfterBuild" Condition="'$(Upload)'=='TRUE' Or '$(Upload)'=='Dry'">
<Target Name="Upload" AfterTargets="AfterBuild" Condition="'$(Upload)'=='true' Or '$(Upload)'=='dry'">
<PropertyGroup>
<DistributionDir>$(SolutionDir)\artifacts\tspublish\dist</DistributionDir>
<PluginsDir>$(DistributionDir)\BepInEx\plugins</PluginsDir>
Expand Down Expand Up @@ -95,9 +95,17 @@
SourceFiles="@(PackageFiles)"
/>

<Exec
Condition="'$(UPLOAD)'=='TRUE'"
Command='dotnet tcli publish --package-name "$(Product)" --package-namespace "$(Authors)" --package-version "$(PACKAGE_VERSION)"'
<PropertyGroup Condition="'$(UPLOAD)'=='true'">
<TcliCommand>publish</TcliCommand>
</PropertyGroup>

<PropertyGroup Condition="'$(UPLOAD)'=='dry'">
<TcliCommand>build</TcliCommand>
<PACKAGE_VERSION>0.0.0</PACKAGE_VERSION>
</PropertyGroup>

<Exec
Command='dotnet tcli $(TcliCommand) --package-name "$(Product)" --package-namespace "$(Authors)" --package-version "$(PACKAGE_VERSION)"'
ConsoleToMSBuild="true"
WorkingDirectory="$(SolutionDir)\artifacts\tspublish"
/>
Expand Down

0 comments on commit 8f12d15

Please sign in to comment.