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">
|
2017-02-22 18:52:50 +00:00
|
|
|
|
|
|
|
<PropertyGroup>
|
|
|
|
<UploadNuGetPackagesArchiveToAzure>false</UploadNuGetPackagesArchiveToAzure>
|
|
|
|
<NuGetConfigContent>
|
|
|
|
<configuration>
|
|
|
|
<packageSources>
|
|
|
|
<add key="configurable.source" value="%CLI_LZMA_PACKAGE_SOURCE%" />
|
|
|
|
</packageSources>
|
|
|
|
</configuration>
|
|
|
|
</NuGetConfigContent>
|
2017-02-24 01:07:26 +00:00
|
|
|
|
|
|
|
<NuGetPackagesArchiveProject>$(IntermediateDirectory)/NuGetPackagesArchiveProject</NuGetPackagesArchiveProject>
|
|
|
|
<NuGetPackagesArchiveFolder>$(IntermediateDirectory)/NuGetPackagesArchiveFolder</NuGetPackagesArchiveFolder>
|
2017-02-22 18:52:50 +00:00
|
|
|
<LZMANuGetConfigFilePath>$(NuGetPackagesArchiveProject)/Nuget.config</LZMANuGetConfigFilePath>
|
2017-02-24 01:07:26 +00:00
|
|
|
<ToolsOutputDirectory>$(BaseOutputDirectory)/tools</ToolsOutputDirectory>
|
|
|
|
<ArchiverDll>$(ToolsOutputDirectory)/Archiver.dll</ArchiverDll>
|
|
|
|
<FinalArchive>$(Stage2Directory)/sdk/$(SdkVersion)/nuGetPackagesArchive.lzma</FinalArchive>
|
2017-02-22 18:52:50 +00:00
|
|
|
</PropertyGroup>
|
|
|
|
|
2016-11-08 23:14:47 +00:00
|
|
|
<Target Name="GetNuGetPackagesArchive"
|
|
|
|
DependsOnTargets="SetupNuGetPackagesArchiveInputsOutputs;
|
|
|
|
DownloadNuGetPackagesArchive;
|
|
|
|
GenerateNuGetPackagesArchive;
|
|
|
|
UploadNuGetPackagesArchiveToAzure"
|
|
|
|
Inputs="$(IntermediateArchive)"
|
2017-02-15 01:21:37 +00:00
|
|
|
Outputs="$(FinalArchive)"
|
|
|
|
Condition=" '$(IncludeNuGetPackageArchive)' == 'true' ">
|
2016-11-08 23:14:47 +00:00
|
|
|
<Copy SourceFiles="$(IntermediateArchive)" DestinationFiles="$(FinalArchive)" />
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="UploadNuGetPackagesArchiveToAzure"
|
|
|
|
DependsOnTargets="SetupNuGetPackagesArchiveInputsOutputs;
|
|
|
|
GenerateNuGetPackagesArchive"
|
2017-01-11 22:44:47 +00:00
|
|
|
Condition=" '$(UploadNuGetPackagesArchiveToAzure)' == 'true' And '$(PUBLISH_LZMA_TO_AZURE_BLOB)' != '' ">
|
2016-11-08 23:14:47 +00:00
|
|
|
<ItemGroup>
|
|
|
|
<NuGetPackagesArchiveToUpload Include="$(IntermediateArchive)" />
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<ItemGroup>
|
|
|
|
<NuGetPackagesArchiveToUpload>
|
2017-01-06 21:44:01 +00:00
|
|
|
<RelativeBlobPath>$(NugetPackagesArchiveRelativeBlobUrl)/$([System.String]::Copy('%(Filename)%(Extension)').Replace('\' ,'/'))</RelativeBlobPath>
|
2016-11-08 23:14:47 +00:00
|
|
|
</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)">
|
2016-12-28 23:05:24 +00:00
|
|
|
|
|
|
|
<!-- I need to use the CreateProperty task in conjunction with the ValueSetByTask TaskParameter -->
|
|
|
|
<!-- to ensure that the property only gets set when the parent target is run. -->
|
|
|
|
<CreateProperty Value="true">
|
|
|
|
<Output TaskParameter="ValueSetByTask" PropertyName="UploadNuGetPackagesArchiveToAzure" />
|
|
|
|
</CreateProperty>
|
2016-11-08 23:14:47 +00:00
|
|
|
|
2016-06-30 17:39:39 +00:00
|
|
|
<ItemGroup>
|
|
|
|
<FilesToClean Include="$(NuGetPackagesArchiveProject)/**/*" />
|
|
|
|
<FilesToClean Include="$(NuGetPackagesArchiveFolder)/**/*" />
|
2017-01-06 21:44:01 +00:00
|
|
|
|
2017-01-27 23:46:55 +00:00
|
|
|
<NuGetPackagesArchiveDirectory Include="$(NuGetPackagesArchiveProject)/Console" />
|
2017-01-06 21:44:01 +00:00
|
|
|
<NuGetPackagesArchiveDirectory Include="$(NuGetPackagesArchiveFolder)" />
|
2016-06-30 17:39:39 +00:00
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
<Delete Files="@(FilesToClean)" />
|
2017-01-06 21:44:01 +00:00
|
|
|
<RemoveDir Directories="@(NuGetPackagesArchiveDirectory)" />
|
|
|
|
<MakeDir Directories="@(NuGetPackagesArchiveDirectory)"/>
|
2016-06-30 17:39:39 +00:00
|
|
|
|
2017-02-02 00:35:52 +00:00
|
|
|
<WriteLinesToFile Condition=" '$(CLI_LZMA_PACKAGE_SOURCE)' != '' "
|
2017-01-24 10:30:24 +00:00
|
|
|
File="$(LZMANuGetConfigFilePath)"
|
|
|
|
Lines="$(NuGetConfigContent)" />
|
|
|
|
|
2016-07-26 04:29:59 +00:00
|
|
|
<DotNetNew ToolPath="$(Stage2Directory)"
|
2017-02-09 16:18:39 +00:00
|
|
|
TemplateType="console"
|
|
|
|
TemplateArgs="--debug:ephemeral-hive"
|
|
|
|
WorkingDirectory="$(NuGetPackagesArchiveProject)/Console" />
|
2017-01-06 21:44:01 +00:00
|
|
|
|
|
|
|
<DotNetRestore ToolPath="$(Stage2Directory)"
|
|
|
|
Packages="$(NuGetPackagesArchiveFolder)"
|
|
|
|
SkipInvalidConfigurations="True"
|
2017-01-27 23:46:55 +00:00
|
|
|
WorkingDirectory="$(NuGetPackagesArchiveProject)/Console" />
|
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
|
|
|
|
2017-01-26 03:19:44 +00:00
|
|
|
<DotNetPublish ToolPath="$(Stage2Directory)"
|
2016-11-03 06:01:57 +00:00
|
|
|
WorkingDirectory="$(RepoRoot)/tools/Archiver"
|
|
|
|
Output="$(ToolsOutputDirectory)"
|
2016-11-03 23:28:21 +00:00
|
|
|
Configuration="$(Configuration)" />
|
2016-06-29 21:10:55 +00:00
|
|
|
|
2017-01-26 03:19:44 +00:00
|
|
|
<Exec Command="$(DotnetStage2) $(ArchiverDll) -a $(IntermediateArchive) $(NuGetPackagesArchiveFolder)" />
|
2016-06-29 21:10:55 +00:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="SetupNuGetPackagesArchiveInputsOutputs"
|
2017-02-23 00:54:15 +00:00
|
|
|
DependsOnTargets="Prepare">
|
2017-02-01 01:31:37 +00:00
|
|
|
<GenerateNuGetPackagesArchiveVersion ToolPath="$(Stage2Directory)">
|
|
|
|
<Output TaskParameter="Version" PropertyName="NuGetPackagesArchiveVersion"/>
|
|
|
|
</GenerateNuGetPackagesArchiveVersion>
|
2016-06-30 17:39:39 +00:00
|
|
|
<PropertyGroup>
|
2016-12-27 21:28:24 +00:00
|
|
|
<NugetPackagesArchiveName>nuGetPackagesArchive.$(NuGetPackagesArchiveVersion).lzma</NugetPackagesArchiveName>
|
2016-11-08 23:14:47 +00:00
|
|
|
<IntermediateArchive>$(IntermediateDirectory)/$(NugetPackagesArchiveName)</IntermediateArchive>
|
2017-01-06 21:44:01 +00:00
|
|
|
<NugetPackagesArchiveRelativeBlobUrl>$(Product)/NuGetPackagesArchives</NugetPackagesArchiveRelativeBlobUrl>
|
|
|
|
<NugetPackagesArchiveBlobUrl>$(DotnetBlobRootUrl)/$(NugetPackagesArchiveRelativeBlobUrl)/$(NugetPackagesArchiveName)</NugetPackagesArchiveBlobUrl>
|
2016-06-30 17:39:39 +00:00
|
|
|
</PropertyGroup>
|
2016-06-29 21:10:55 +00:00
|
|
|
</Target>
|
2017-02-15 01:21:37 +00:00
|
|
|
</Project>
|