dotnet-installer/build/package/Archive.targets

54 lines
2.1 KiB
Text
Raw Normal View History

2016-06-28 01:26:57 +00:00
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Layout" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2017-02-23 18:37:48 +00:00
<PropertyGroup>
<ArchiveOutputDirectory>$(PackagesDirectory)</ArchiveOutputDirectory>
</PropertyGroup>
<Target Name="GenerateArchives"
DependsOnTargets="Init;
Layout;
SetupGenerateArchivesInputsOutputs;
MakePackagesDir;"
Inputs="%(GenerateArchivesInputsOutputs.Inputs)"
Outputs="%(GenerateArchivesInputsOutputs.Outputs)">
2016-06-28 01:26:57 +00:00
<PropertyGroup>
<GenerateArchivesDestinationArchive>$(ArchiveOutputDirectory)/%(GenerateArchivesInputsOutputs.OutFileName)$(ArchiveExtension)</GenerateArchivesDestinationArchive>
2016-06-28 01:26:57 +00:00
</PropertyGroup>
<ZipFileCreateFromDirectory
Condition=" '$(OSName)' == 'win' "
SourceDirectory="%(GenerateArchivesInputsOutputs.InputDirectory)"
DestinationArchive="$(GenerateArchivesDestinationArchive)"
OverwriteDestination="true"/>
<TarGzFileCreateFromDirectory
Condition=" '$(OSName)' != 'win' "
SourceDirectory="%(GenerateArchivesInputsOutputs.InputDirectory)"
DestinationArchive="$(GenerateArchivesDestinationArchive)"
OverwriteDestination="true"/>
2016-06-28 01:26:57 +00:00
<ItemGroup>
<Archives Include="$(GenerateArchivesDestinationArchive)" />
</ItemGroup>
</Target>
2016-07-01 14:04:40 +00:00
<Target Name="SetupGenerateArchivesInputsOutputs"
DependsOnTargets="Init">
<ItemGroup>
2016-07-01 14:04:40 +00:00
<GenerateArchivesInputsOutputs Include="%(LayoutDefinition.Name)">
<Inputs>%(LayoutDefinition.OutputFiles)</Inputs>
<Outputs>$(ArchiveOutputDirectory)/%(LayoutDefinition.NameWithVersion)$(ArchiveExtension)</Outputs>
<InputDirectory>$(LayoutDirectory)/%(LayoutDefinition.Name)</InputDirectory>
<OutFileName>%(LayoutDefinition.NameWithVersion)</OutFileName>
</GenerateArchivesInputsOutputs>
2016-06-28 01:26:57 +00:00
</ItemGroup>
</Target>
<Target Name="MakePackagesDir">
<MakeDir Directories="$(PackagesDirectory)" />
2016-06-28 01:26:57 +00:00
</Target>
</Project>