dotnet-installer/build/package/Microsoft.DotNet.Cli.Archive.targets
2016-07-13 11:07:14 -07:00

39 lines
1.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Layout" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="ArchiveDirectory" AssemblyFile="$(CLIBuildDll)" />
<Target Name="SetupGenerateArchivesInputsOutputs" DependsOnTargets="Init">
<PropertyGroup>
<ArchiveOutputDirectory>$(PackagesDirectory)</ArchiveOutputDirectory>
</PropertyGroup>
<ItemGroup>
<GeneratedArchives Include="$(ArchiveOutputDirectory)/%(LayoutDefinition.NameWithVersion)$(ArchiveExtension)" />
<GenerateArchivesInputsOutputs Include="%(LayoutDefinition.Name)">
<Inputs>%(LayoutDefinition.OutputFiles)</Inputs>
<Outputs>$(ArchiveOutputDirectory)/%(LayoutDefinition.NameWithVersion)$(ArchiveExtension)</Outputs>
<InputDirectory>$(LayoutDirectory)/%(LayoutDefinition.Name)</InputDirectory>
<OutFileName>%(LayoutDefinition.NameWithVersion)</OutFileName>
</GenerateArchivesInputsOutputs>
</ItemGroup>
</Target>
<Target Name="GenerateArchives"
DependsOnTargets="Init;Layout;SetupGenerateArchivesInputsOutputs"
Inputs="%(GenerateArchivesInputsOutputs.Inputs)"
Outputs="%(GenerateArchivesInputsOutputs.Outputs)">
<ArchiveDirectory
FileName="%(GenerateArchivesInputsOutputs.OutFileName)"
OutputDirectory="$(ArchiveOutputDirectory)"
InputDirectory="%(GenerateArchivesInputsOutputs.InputDirectory)" >
<Output TaskParameter="OutputArchive"
ItemName="Archives" />
</ArchiveDirectory>
</Target>
</Project>