dotnet-installer/build/compile/Microsoft.DotNet.Cli.LzmaArchive.targets
Piotr Puszkiewicz 6fcbefa4f7 [WIP] Removes *3 verbs, making msbuild the driver (#4456)
Removes *3 verbs, making msbuild the driver
2016-10-27 18:46:43 -07:00

58 lines
No EOL
3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="GenerateNuGetPackagesArchive"
DependsOnTargets="SetupNuGetPackagesArchiveInputsOutputs"
Inputs="@(GenerateNuGetPackagesArchiveInputs)"
Outputs="$(FinalArchive)">
<ItemGroup>
<FilesToClean Include="$(NuGetPackagesArchiveProject)/**/*" />
<FilesToClean Include="$(NuGetPackagesArchiveFolder)/**/*" />
</ItemGroup>
<Delete Files="@(FilesToClean)" />
<RemoveDir Directories="$(NuGetPackagesArchiveProject);$(NuGetPackagesArchiveFolder)" />
<MakeDir Directories="$(NuGetPackagesArchiveProject);$(NuGetPackagesArchiveFolder)"/>
<DotNetNew ToolPath="$(Stage2Directory)"
WorkingDirectory="$(NuGetPackagesArchiveProject)" />
<DotNetRestore ToolPath="$(Stage2Directory)"
Packages="$(NuGetPackagesArchiveFolder)"
SkipInvalidConfigurations="True"
WorkingDirectory="$(NuGetPackagesArchiveProject)" />
<Delete Files="$(IntermediateArchive);$(IntermediateArchive).zip" />
<Message Text="Publishing Archiver" />
<DotNetPublish ToolPath="$(Stage0Directory)"
WorkingDirectory="$(RepoRoot)/tools/Archiver"
Output="$(ToolsOutputDirectory)"
Configuration="$(Configuration)" />
<Exec Command="$(ArchiverExe) -a $(IntermediateArchive) $(NuGetPackagesArchiveFolder)" />
<Copy SourceFiles="$(IntermediateArchive)" DestinationFiles="$(FinalArchive)" />
</Target>
<Target Name="SetupNuGetPackagesArchiveInputsOutputs"
DependsOnTargets="Prepare;SetupStage">
<PropertyGroup>
<NuGetPackagesArchiveProject>$(IntermediateDirectory)/NuGetPackagesArchiveProject</NuGetPackagesArchiveProject>
<NuGetPackagesArchiveFolder>$(IntermediateDirectory)/NuGetPackagesArchiveFolder</NuGetPackagesArchiveFolder>
<ArchiverExe>$(ToolsOutputDirectory)/Archiver</ArchiverExe>
<IntermediateArchive>$(IntermediateDirectory)/nuGetPackagesArchive.lzma</IntermediateArchive>
<FinalArchive>$(Stage2Directory)/sdk/$(SdkVersion)/nuGetPackagesArchive.lzma</FinalArchive>
</PropertyGroup>
<ItemGroup>
<GenerateNuGetPackagesArchiveInputs Include="$(_DotNetNewFolder)/CSharp_Console/**/*" />
<GenerateNuGetPackagesArchiveInputs Include="$(SrcDirectory)/dotnet-archive/**/*"
Exclude="$(SrcDirectory)/dotnet-archive/**/bin/**/*;
$(SrcDirectory)/dotnet-archive/**/obj/**/*" />
<GenerateNuGetPackagesArchiveInputs Include="$(SrcDirectory)/Microsoft.DotNet.Archive/**/*"
Exclude="$(SrcDirectory)/Microsoft.DotNet.Archive/**/bin/**/*;
$(SrcDirectory)/Microsoft.DotNet.Archive/**/obj/**/*" />
</ItemGroup>
</Target>
</Project>