Skip to content

Commit

Permalink
Remove TransformInitTools target, and only call dotnet tool restore i…
Browse files Browse the repository at this point in the history
…f the manifest file exists
  • Loading branch information
volkanceylan committed Nov 3, 2024
1 parent 99c05b6 commit 51e977e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions common-features/build/Feature.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@
</ItemGroup>
<Import Project="$(SerenitySrc)Serenity.Net.Web\Serenity.Net.Web.targets" Condition="'$(AddAutoRefs)' != 'false'" />
<Import Project="$(SerenitySrc)RestoreNpmPackages.targets" />
<Target Name="TransformInitTools" BeforeTargets="BeforeBuild" Condition="!Exists('$(DotnetToolManifestFile)')">
<Exec Command="dotnet new tool-manifest" ContinueOnError="true" WorkingDirectory="$(MSBuildProjectDirectory)\..\" />
<Exec Command="dotnet tool install sergen" ContinueOnError="true" WorkingDirectory="$(MSBuildProjectDirectory)\..\" />
</Target>
<Target Name="TransformToolRestore" BeforeTargets="BeforeBuild" DependsOnTargets="TransformInitTools"
<Target Name="TransformToolRestore" BeforeTargets="BeforeBuild"
Inputs="$(DotnetToolManifestFile)" Outputs="$(DotnetToolRestoreStamp)"
Condition="'$(DotNetSergen)' == 'dotnet sergen' And ('$(SergenTransform)' != '' OR Exists('tsconfig.json'))">
Condition="Exists('$(DotnetToolManifestFile)') And '$(DotNetSergen)' == 'dotnet sergen' And '$(SergenTransform)' != 'none' And ('$(SergenTransform)' != '' OR Exists('tsconfig.json'))">
<Exec Command="dotnet tool restore" ContinueOnError="true" />
<Touch Files="$(DotnetToolRestoreStamp)" AlwaysCreate="true" />
</Target>
Expand Down

0 comments on commit 51e977e

Please sign in to comment.