2016-07-01 18:02:26 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
2016-11-08 23:14:47 +00:00
|
|
|
<Target Name="GetNuGetPackagesArchive"
|
|
|
|
DependsOnTargets="SetupNuGetPackagesArchiveInputsOutputs;
|
|
|
|
DownloadNuGetPackagesArchive;
|
|
|
|
GenerateNuGetPackagesArchive;
|
|
|
|
UploadNuGetPackagesArchiveToAzure"
|
|
|
|
Inputs="$(IntermediateArchive)"
|
|
|
|
Outputs="$(FinalArchive)">
|
|
|
|
<Copy SourceFiles="$(IntermediateArchive)" DestinationFiles="$(FinalArchive)" />
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="UploadNuGetPackagesArchiveToAzure"
|
|
|
|
DependsOnTargets="SetupNuGetPackagesArchiveInputsOutputs;
|
|
|
|
SetupAzureBlobInformation;
|
|
|
|
GenerateNuGetPackagesArchive"
|
2016-11-10 00:44:35 +00:00
|
|
|
Condition=" '$(UploadNuGetPackagesArchiveToAzure)' == 'true' And '$(PUBLISH_TO_AZURE_BLOB)' != '' ">
|
2016-11-08 23:14:47 +00:00
|
|
|
<ItemGroup>
|
|
|
|
<NuGetPackagesArchiveToUpload Include="$(IntermediateArchive)" />
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<ItemGroup>
|
|
|
|
<NuGetPackagesArchiveToUpload>
|
|
|
|
<RelativeBlobPath>$(CoreSetupChannel)/Binaries/$(SharedFrameworkVersion)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath>
|
|
|
|
</NuGetPackagesArchiveToUpload>
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<UploadToAzure
|
|
|
|
AccountKey="$(ArtifactCloudDropAccessToken)"
|
|
|
|
AccountName="$(ArtifactCloudDropAccountName)"
|
|
|
|
ContainerName="$(ArtifactContainerName)"
|
|
|
|
Items="@(NuGetPackagesArchiveToUpload)"
|
|
|
|
Overwrite="false"
|
|
|
|
ContinueOnError="WarnAndContinue" />
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="DownloadNuGetPackagesArchive"
|
|
|
|
DependsOnTargets="SetupNuGetPackagesArchiveInputsOutputs"
|
|
|
|
Inputs="$(IntermediateArchive)"
|
|
|
|
Outputs="$(IntermediateArchive)">
|
|
|
|
<DownloadFile Uri="$(NugetPackagesArchiveBlobUrl)"
|
|
|
|
DestinationPath="$(IntermediateArchive)"
|
|
|
|
ContinueOnError="WarnAndContinue" />
|
|
|
|
</Target>
|
|
|
|
|
2016-06-29 21:10:55 +00:00
|
|
|
<Target Name="GenerateNuGetPackagesArchive"
|
2016-06-30 21:17:47 +00:00
|
|
|
DependsOnTargets="SetupNuGetPackagesArchiveInputsOutputs"
|
2016-11-08 23:14:47 +00:00
|
|
|
Inputs="$(IntermediateArchive)"
|
|
|
|
Outputs="$(IntermediateArchive)">
|
|
|
|
<PropertyGroup>
|
|
|
|
<UploadNuGetPackagesArchiveToAzure>true</UploadNuGetPackagesArchiveToAzure>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
2016-06-30 17:39:39 +00:00
|
|
|
<ItemGroup>
|
|
|
|
<FilesToClean Include="$(NuGetPackagesArchiveProject)/**/*" />
|
|
|
|
<FilesToClean Include="$(NuGetPackagesArchiveFolder)/**/*" />
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<Delete Files="@(FilesToClean)" />
|
|
|
|
<RemoveDir Directories="$(NuGetPackagesArchiveProject);$(NuGetPackagesArchiveFolder)" />
|
|
|
|
<MakeDir Directories="$(NuGetPackagesArchiveProject);$(NuGetPackagesArchiveFolder)"/>
|
|
|
|
|
2016-07-26 04:29:59 +00:00
|
|
|
<DotNetNew ToolPath="$(Stage2Directory)"
|
|
|
|
WorkingDirectory="$(NuGetPackagesArchiveProject)" />
|
2016-10-14 07:06:35 +00:00
|
|
|
|
2016-10-28 01:46:43 +00:00
|
|
|
<DotNetRestore ToolPath="$(Stage2Directory)"
|
2016-07-26 04:29:59 +00:00
|
|
|
Packages="$(NuGetPackagesArchiveFolder)"
|
2016-10-14 07:06:35 +00:00
|
|
|
SkipInvalidConfigurations="True"
|
2016-07-26 04:29:59 +00:00
|
|
|
WorkingDirectory="$(NuGetPackagesArchiveProject)" />
|
2016-06-29 21:10:55 +00:00
|
|
|
|
2016-06-30 17:39:39 +00:00
|
|
|
<Delete Files="$(IntermediateArchive);$(IntermediateArchive).zip" />
|
2016-06-29 21:10:55 +00:00
|
|
|
|
2016-06-30 17:39:39 +00:00
|
|
|
<Message Text="Publishing Archiver" />
|
2016-07-26 04:29:59 +00:00
|
|
|
|
2016-11-03 06:01:57 +00:00
|
|
|
<DotNetPublish ToolPath="$(Stage0Directory)"
|
|
|
|
WorkingDirectory="$(RepoRoot)/tools/Archiver"
|
|
|
|
Output="$(ToolsOutputDirectory)"
|
2016-11-03 23:28:21 +00:00
|
|
|
Configuration="$(Configuration)" />
|
2016-06-29 21:10:55 +00:00
|
|
|
|
2016-11-03 23:28:21 +00:00
|
|
|
<Exec Command="$(DotnetStage0) $(ArchiverDll) -a $(IntermediateArchive) $(NuGetPackagesArchiveFolder)" />
|
2016-06-29 21:10:55 +00:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="SetupNuGetPackagesArchiveInputsOutputs"
|
2016-07-01 18:02:26 +00:00
|
|
|
DependsOnTargets="Prepare;SetupStage">
|
2016-06-30 17:39:39 +00:00
|
|
|
<PropertyGroup>
|
2016-11-08 23:14:47 +00:00
|
|
|
<NugetPackagesArchiveName>nuGetPackagesArchive.$(SharedFrameworkVersion).lzma</NugetPackagesArchiveName>
|
2016-06-30 17:39:39 +00:00
|
|
|
<NuGetPackagesArchiveProject>$(IntermediateDirectory)/NuGetPackagesArchiveProject</NuGetPackagesArchiveProject>
|
|
|
|
<NuGetPackagesArchiveFolder>$(IntermediateDirectory)/NuGetPackagesArchiveFolder</NuGetPackagesArchiveFolder>
|
2016-11-03 23:28:21 +00:00
|
|
|
<ArchiverDll>$(ToolsOutputDirectory)/Archiver.dll</ArchiverDll>
|
2016-11-08 23:14:47 +00:00
|
|
|
<IntermediateArchive>$(IntermediateDirectory)/$(NugetPackagesArchiveName)</IntermediateArchive>
|
2016-06-30 21:17:47 +00:00
|
|
|
<FinalArchive>$(Stage2Directory)/sdk/$(SdkVersion)/nuGetPackagesArchive.lzma</FinalArchive>
|
2016-11-08 23:14:47 +00:00
|
|
|
<NugetPackagesArchiveBlobUrl>$(SharedFrameworkArchiveBlobRootUrl)/$(NugetPackagesArchiveName)</NugetPackagesArchiveBlobUrl>
|
2016-06-30 17:39:39 +00:00
|
|
|
</PropertyGroup>
|
2016-06-29 21:10:55 +00:00
|
|
|
</Target>
|
|
|
|
</Project>
|