Enable custom restore of NPM dependencies for csproj files
Enables custom restore of NPM dependencies for csproj files that require it.
This commit is contained in:
parent
7bd1e5ea20
commit
5889aea06c
|
|
@ -18,12 +18,7 @@
|
|||
|
||||
<Target Name="Restore">
|
||||
<Message Importance="High" Text="Running yarn install on $(MSBuildProjectFullPath)" />
|
||||
<Yarn Command="install $(InstallArgs)" ContinueOnError="true">
|
||||
<Output TaskParameter="ExitCode" PropertyName="_YarnExitCode"/>
|
||||
</Yarn>
|
||||
<Yarn Command="install $(InstallArgs)" Condition="'$(_YarnExitCode)' != '0'">
|
||||
<Output TaskParameter="ExitCode" PropertyName="_YarnExitCode"/>
|
||||
</Yarn>
|
||||
<Yarn Command="install $(InstallArgs)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="PrepareForBuild">
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
version:3.0.0-build-20190408.1
|
||||
commithash:8b533cbfa5357e5785f4c4231231c1234cfc2c5f
|
||||
version:3.0.0-build-20190412.2
|
||||
commithash:0e543fb8761394491250585d3811bdbb62e350e8
|
||||
|
|
|
|||
|
|
@ -21,12 +21,15 @@
|
|||
|
||||
<Target Name="YarnInstall">
|
||||
<Message Text="Running yarn install on $(MSBuildProjectFile)" Importance="High" />
|
||||
<Yarn Command="install" ContinueOnError="true">
|
||||
<Output TaskParameter="ExitCode" PropertyName="_YarnExitCode"/>
|
||||
</Yarn>
|
||||
<Yarn Command="install" Condition="'$(_YarnExitCode)' != '0'">
|
||||
<Output TaskParameter="ExitCode" PropertyName="_YarnExitCode"/>
|
||||
</Yarn>
|
||||
<Yarn Command="install" />
|
||||
</Target>
|
||||
|
||||
<Target Name="_IsCustomRestoreTargetSupported" Returns="@(CustomRestoreTargets)" Condition="'$(BuildNodeJs)' == 'true'">
|
||||
<ItemGroup>
|
||||
<CustomRestoreTargets Include="$(MSBuildProjectFullPath)">
|
||||
<Targets>YarnInstall</Targets>
|
||||
</CustomRestoreTargets>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="PrepublishScript" DependsOnTargets="YarnInstall" BeforeTargets="PrepareForPublish" Condition=" '$(IsCrossTargetingBuild)' != 'true' ">
|
||||
|
|
|
|||
|
|
@ -25,12 +25,15 @@
|
|||
|
||||
<Target Name="YarnInstall">
|
||||
<Message Text="Running yarn install on $(MSBuildProjectFile)" Importance="High" />
|
||||
<Yarn Command="install" ContinueOnError="true">
|
||||
<Output TaskParameter="ExitCode" PropertyName="_YarnExitCode"/>
|
||||
</Yarn>
|
||||
<Yarn Command="install" Condition="'$(_YarnExitCode)' != '0'">
|
||||
<Output TaskParameter="ExitCode" PropertyName="_YarnExitCode"/>
|
||||
</Yarn>
|
||||
<Yarn Command="install" />
|
||||
</Target>
|
||||
|
||||
<Target Name="_IsCustomRestoreTargetSupported" Returns="@(CustomRestoreTargets)" Condition="'$(BuildNodeJs)' == 'true'">
|
||||
<ItemGroup>
|
||||
<CustomRestoreTargets Include="$(MSBuildProjectFullPath)">
|
||||
<Targets>YarnInstall</Targets>
|
||||
</CustomRestoreTargets>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="PrepublishScript" DependsOnTargets="YarnInstall" BeforeTargets="PrepareForPublish" Condition=" '$(IsCrossTargetingBuild)' != 'true' ">
|
||||
|
|
|
|||
|
|
@ -11,12 +11,15 @@
|
|||
Importance="High"
|
||||
Text="Prerequisites were not enforced at build time. Running Yarn or the E2E tests might fail as a result. Check /src/Shared/E2ETesting/Readme.md for instructions." />
|
||||
|
||||
<Yarn Command="install" ContinueOnError="true">
|
||||
<Output TaskParameter="ExitCode" PropertyName="_YarnExitCode"/>
|
||||
</Yarn>
|
||||
<Yarn Command="install" Condition="'$(_YarnExitCode)' != '0'">
|
||||
<Output TaskParameter="ExitCode" PropertyName="_YarnExitCode"/>
|
||||
</Yarn>
|
||||
<Yarn Command="install" />
|
||||
</Target>
|
||||
|
||||
<Target Name="_IsCustomRestoreTargetSupported" Returns="@(CustomRestoreTargets)" Condition="'$(BuildNodeJs)' == 'true'">
|
||||
<ItemGroup>
|
||||
<CustomRestoreTargets Include="$(MSBuildProjectFullPath)">
|
||||
<Targets>EnsureNodeJSRestored</Targets>
|
||||
</CustomRestoreTargets>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target
|
||||
|
|
|
|||
Loading…
Reference in New Issue