When BuildGraphOf is used, only pin package references to packages currently building

This commit is contained in:
Nate McMaster 2017-09-18 12:31:08 -07:00
parent 4924f79efc
commit 4182b0b5d2
1 changed files with 10 additions and 1 deletions

View File

@ -20,10 +20,19 @@
<ItemGroup>
<PinPackageSources Include="$(BuildDir)" />
<PinPackageSources Include="$(_DependencyPackagesDirectory)" Condition="Exists('$(_DependencyPackagesDirectory)')" />
<PinnedArtifactInfo Include="@(ArtifactInfo)" Condition="'$(BuildGraphOf)' == ''" />
</ItemGroup>
<!-- If we are building a sub-graph, we need to re-examine the list of artifacts that will actual build. -->
<MSBuild Projects="$(MSBuildProjectFullPath)"
Targets="GetArtifactInfo"
Properties="RepositoryRoot=$(_CloneRepositoryRoot)%(RepositoryBuildOrder.Identity)\;Configuration=$(Configuration);BuildNumber=$(BuildNumber)"
Condition="'$(BuildGraphOf)' != ''">
<Output TaskParameter="TargetOutputs" ItemName="PinnedArtifactInfo" />
</MSBuild>
<RepoTasks.GenerateLineup
Artifacts="@(ArtifactInfo)"
Artifacts="@(PinnedArtifactInfo)"
Repository="%(RepositoryBuildOrder.Identity)"
OutputPath="%(RepositoryBuildOrder.RepositoryPath)\build\dependencies.g.targets"
RestoreAdditionalSources="@(PinPackageSources)"