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"
|
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-12-28 23:05:24 +00:00
|
|
|
<PropertyGroup>
|
|
|
|
<UploadNuGetPackagesArchiveToAzure>false</UploadNuGetPackagesArchiveToAzure>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
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
|
|
|
|
|
|
|
<NuGetPackagesArchiveDirectory Include="$(NuGetPackagesArchiveProject)/Web" />
|
|
|
|
<NuGetPackagesArchiveDirectory Include="$(NuGetPackagesArchiveProject)/Web1.1" />
|
|
|
|
<NuGetPackagesArchiveDirectory Include="$(NuGetPackagesArchiveFolder)" />
|
2016-06-30 17:39:39 +00:00
|
|
|
</ItemGroup>
|
|
|
|
|
2017-01-24 10:30:24 +00:00
|
|
|
<PropertyGroup>
|
|
|
|
<NuGetConfigContent>
|
|
|
|
<configuration>
|
|
|
|
<packageSources>
|
|
|
|
<add key="configurable.source" value="%CLI_LZMA_PACKAGE_SOURCE%" />
|
|
|
|
</packageSources>
|
|
|
|
</configuration>
|
|
|
|
</NuGetConfigContent>
|
|
|
|
<LZMANuGetConfigFilePath>$(NuGetPackagesArchiveProject)/Nuget.config</LZMANuGetConfigFilePath>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
2016-06-30 17:39:39 +00:00
|
|
|
<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-01 01:31:37 +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-01 01:31:37 +00:00
|
|
|
TemplateType="Mvc"
|
2017-02-22 05:04:50 +00:00
|
|
|
TemplateArgs="-au Individual -f netcoreapp1.0 --debug:ephemeral-hive --no-tools"
|
2017-01-06 21:44:01 +00:00
|
|
|
WorkingDirectory="$(NuGetPackagesArchiveProject)/Web" />
|
|
|
|
|
|
|
|
<DotNetRestore ToolPath="$(Stage2Directory)"
|
|
|
|
Packages="$(NuGetPackagesArchiveFolder)"
|
|
|
|
SkipInvalidConfigurations="True"
|
|
|
|
WorkingDirectory="$(NuGetPackagesArchiveProject)/Web" />
|
|
|
|
|
|
|
|
<DotNetNew ToolPath="$(Stage2Directory)"
|
2017-02-01 01:31:37 +00:00
|
|
|
TemplateType="Mvc"
|
2017-02-16 04:38:25 +00:00
|
|
|
TemplateArgs="-au Individual -f netcoreapp1.1 --debug:ephemeral-hive --no-tools"
|
2017-01-06 21:44:01 +00:00
|
|
|
WorkingDirectory="$(NuGetPackagesArchiveProject)/Web1.1" />
|
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"
|
2017-01-06 21:44:01 +00:00
|
|
|
WorkingDirectory="$(NuGetPackagesArchiveProject)/Web1.1" />
|
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-04 21:27:41 +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-04 21:27:41 +00:00
|
|
|
<Exec Command="$(DotnetStage2) $(ArchiverDll) -a $(IntermediateArchive) $(NuGetPackagesArchiveFolder)" />
|
2016-06-29 21:10:55 +00:00
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="SetupNuGetPackagesArchiveInputsOutputs"
|
2017-01-06 21:44:01 +00:00
|
|
|
DependsOnTargets="Prepare;SetupStage;SetupAzureBlobInformation">
|
2017-02-23 09:13:58 +00:00
|
|
|
<GenerateNuGetPackagesArchiveVersion ToolPath="$(Stage2Directory)" SDKVersion="$(CLI_NETSDK_Version)">
|
2017-02-01 01:31:37 +00:00
|
|
|
<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-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>
|
2017-01-06 21:44:01 +00:00
|
|
|
<NugetPackagesArchiveRelativeBlobUrl>$(Product)/NuGetPackagesArchives</NugetPackagesArchiveRelativeBlobUrl>
|
2017-05-03 18:40:52 +00:00
|
|
|
<NugetPackagesArchiveBlobUrl>$(DotnetBlobRootUrl)/$(NugetPackagesArchiveRelativeBlobUrl)/$(NugetPackagesArchiveName)$(CoreSetupBlobAccessTokenParam)</NugetPackagesArchiveBlobUrl>
|
2016-06-30 17:39:39 +00:00
|
|
|
</PropertyGroup>
|
2016-06-29 21:10:55 +00:00
|
|
|
</Target>
|
|
|
|
</Project>
|