
For injestion into a composed build, I'm adding some minor tweaks to our build system: - Teach DownloadFile task how to consume file:// URLs so we can pass around artifacts using local sources. - Add `SkipBuildingInstallers`, an MSBuild property that can be set to true when installers (pkgs, msis, debs, rpms and the like) do not need to be built. - Add `IncludeAdditionalSharedFrameworks`, an MSBuild property that can be set to prevent additional shared frameworks (i.e. shared frameworks that the CLI does not use at runtime) from being downloaded and included in our payload. - Add `IncludeNuGetPackageArchive` an MSBuild property that can be set to prevent the lzma archive containing all the nupkgs we restore on first run from being included in the final output. - Provide a way to change the Uri use for blob storage (so the composed build and point at a local folder that looks like blob storage to pick up artifacts from).
53 lines
2.1 KiB
XML
53 lines
2.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<Project ToolsVersion="14.0" DefaultTargets="Layout" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
<Target Name="GenerateArchives"
|
|
DependsOnTargets="Init;
|
|
Layout;
|
|
SetupGenerateArchivesInputsOutputs;
|
|
MakePackagesDir;"
|
|
Inputs="%(GenerateArchivesInputsOutputs.Inputs)"
|
|
Outputs="%(GenerateArchivesInputsOutputs.Outputs)">
|
|
|
|
<PropertyGroup>
|
|
<GenerateArchivesDestinationArchive>$(ArchiveOutputDirectory)/%(GenerateArchivesInputsOutputs.OutFileName)$(ArchiveExtension)</GenerateArchivesDestinationArchive>
|
|
</PropertyGroup>
|
|
|
|
<ZipFileCreateFromDirectory
|
|
Condition=" '$(OSName)' == 'win' "
|
|
SourceDirectory="%(GenerateArchivesInputsOutputs.InputDirectory)"
|
|
DestinationArchive="$(GenerateArchivesDestinationArchive)"
|
|
OverwriteDestination="true"/>
|
|
|
|
<TarGzFileCreateFromDirectory
|
|
Condition=" '$(OSName)' != 'win' "
|
|
SourceDirectory="%(GenerateArchivesInputsOutputs.InputDirectory)"
|
|
DestinationArchive="$(GenerateArchivesDestinationArchive)"
|
|
OverwriteDestination="true"/>
|
|
|
|
<ItemGroup>
|
|
<Archives Include="$(GenerateArchivesDestinationArchive)" />
|
|
</ItemGroup>
|
|
|
|
</Target>
|
|
|
|
<Target Name="SetupGenerateArchivesInputsOutputs"
|
|
DependsOnTargets="Init">
|
|
<PropertyGroup>
|
|
<ArchiveOutputDirectory>$(PackagesDirectory)</ArchiveOutputDirectory>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<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="MakePackagesDir">
|
|
<MakeDir Directories="$(PackagesDirectory)" />
|
|
</Target>
|
|
|
|
</Project>
|