Dependency Uptake: download and import a package version props file.

This commit is contained in:
John Beisner 2017-12-01 12:39:51 -08:00
parent 4adabde4c9
commit c54911b788
5 changed files with 19 additions and 3 deletions

View file

@ -33,7 +33,8 @@
<Target Name="RestoreDotnetCliBuildFramework"
Inputs="$(DotnetCliBuildDirectory)/dotnet-cli-build.csproj"
Outputs="@(RestoreDotnetCliBuildFrameworkOutputs)"
DependsOnTargets="WriteNugetConfigFile">
DependsOnTargets="DownloadPackageVersionsProps;
WriteNugetConfigFile"/>
<PropertyGroup>
<ExtraRestoreArgs>$(ExtraRestoreArgs) /p:GeneratePropsFile=$(GeneratePropsFile)</ExtraRestoreArgs>
@ -46,10 +47,11 @@
<Target Name="BuildTheWholeCli" DependsOnTargets="$(CLITargets)" />
<Import Project="build/DownloadedPackageVersions.targets" />
<Import Project="build/NugetConfigFile.targets" />
<Import Project="build/GitCommitInfo.targets" />
<Import Project="build/HostInfo.targets" />
<Import Project="build/BuildInfo.targets" />
<Import Project="build/NugetConfigFile.targets" />
<Import Project="build/Prepare.targets" />
<Import Project="build/Compile.targets" />
<Import Project="build/Package.targets" />

View file

@ -0,0 +1,11 @@
<Project ToolsVersion="15.0">
<Target Name="DownloadPackageVersionsProps">
<PropertyGroup>
<PB_AssetRootAccessTokenSuffixParam Condition=" '$(PB_AssetRootAccessTokenSuffix)' != '' ">?$(PB_AssetRootAccessTokenSuffix)</PB_AssetRootAccessTokenSuffixParam>
</PropertyGroup>
<DownloadFile Uri="$(PB_PackageVersionPropsUrl)?$(PB_AssetRootAccessTokenSuffixParam)"
DestinationPath="$(DownloadedPackageVersionsProps)"
Condition=" '$(PB_PackageVersionPropsUrl)' != '' " />
</Target>
</Project>

View file

@ -4,6 +4,7 @@
<GitCommitInfoProps>$(GeneratedPropsDir)/GitCommitInfo.props</GitCommitInfoProps>
<HostInfoProps>$(GeneratedPropsDir)/HostInfo.props</HostInfoProps>
<BuildInfoProps>$(GeneratedPropsDir)/BuildInfo.props</BuildInfoProps>
<DownloadedPackageVersionsProps>$(GeneratedPropsDir)/DownloadedPackageVersions.props</DownloadedPackageVersionsProps>
<GeneratedNuGetConfig>$(RepoRoot)/NuGet.Config</GeneratedNuGetConfig>
</PropertyGroup>
</Project>

View file

@ -1,6 +1,7 @@
<Project ToolsVersion="15.0">
<Target Name="WriteDynamicPropsToStaticPropsFiles"
DependsOnTargets="WriteNugetConfigFile;
DependsOnTargets="DownloadPackageVersionsProps;
WriteNugetConfigFile;
BuildDotnetCliBuildFramework;
EnsureGeneratedPropsDirectory;
WriteGitCommitInfoProps;

View file

@ -25,6 +25,7 @@
<Import Project="build/BundledSdks.props" />
<Import Project="build/BundledTemplates.props" />
<Import Project="build/DependencyVersions.props" />
<Import Condition=" Exists('$(DownloadedPackageVersionsProps)') " Project="$(DownloadedPackageVersionsProps)" />
<Import Project="build/Version.props" />
<Import Project="build/Branding.props" />