Skip to content

Commit

Permalink
Add Aspire Project templates after dotnet environment is set
Browse files Browse the repository at this point in the history
  • Loading branch information
joperezr committed Sep 23, 2024
1 parent 2d28b53 commit 9bb8742
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions tests/helix/send-to-helix-inner.proj
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,16 @@
<DownloadFile SourceUrl="https://raw.github.com/BorisWilhelms/create-dotnet-devcert/main/scripts/common.sh" DestinationFolder="$(_CreateDotNetDevCertsDirectory)" />
</Target>

<!-- Once the dotnet sdk and path is set for the environment, we install Aspire Project templates if they are needed for the test run. -->
<Target Name="InstallProjectTemplates"
Condition="'$(NeedsWorkload)' == 'true'"
AfterTargets="AddDotNetSdk">
<PropertyGroup>
<HelixPreCommands>$(HelixPreCommands);dotnet new install Aspire.ProjectTemplates::$(Version) --force</HelixPreCommands>
<HelixPostCommands>dotnet new uninstall Aspire.ProjectTemplates;$(HelixPostCommands)</HelixPostCommands>
</PropertyGroup>
</Target>

<Target Name="BuildHelixWorkItems" DependsOnTargets="$(BuildHelixWorkItemsDependsOn)" BeforeTargets="Build">
<Error Condition="'$(_DotNetCoverageToolDir)' == '' or !Exists($(_DotNetCoverageToolDir))"
Text="Could not find dotnet-coverage tool. %24(_DotNetCoverageToolDir)=$(_DotNetCoverageToolDir)" />
Expand All @@ -187,11 +197,6 @@
<HelixPreCommand Condition="'$(OS)' == 'Windows_NT'" Include="$(_EnvVarSetKeyword) DcpPublisher__CliPath=$(_HelixCorrelationPayloadEnvVar)\dcp\dcp.exe" />
</ItemGroup>

<ItemGroup Condition="'$(NeedsWorkload)' == 'true'">
<HelixPreCommand Include="dotnet new install Aspire.ProjectTemplates::$(Version) --force" />
<HelixPostCommand Include="dotnet new uninstall Aspire.ProjectTemplates" />
</ItemGroup>

<PropertyGroup>
<HelixPreCommands>$(HelixPreCommands);@(HelixPreCommand)</HelixPreCommands>
<HelixPostCommands>$(HelixPostCommands);@(HelixPostCommand)</HelixPostCommands>
Expand Down

0 comments on commit 9bb8742

Please sign in to comment.