aspnetcore/src/Installers/Archive/Archive.Internal.zipproj

52 lines
2.2 KiB
Plaintext

<!--
This archive should only contain the ASP.NET Core shared runtime and is intended for internal-use only.
For example, this .zip is used to handoff bits to partner teams who then incorporate our shared frameworks
into their installers or redist's.
-->
<Project>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" />
<PropertyGroup>
<!-- Use a short folder name to avoid MAX_PATH issues on Windows -->
<IntermediateOutputPath>$(ArtifactsObjDir)ai\$(TargetRuntimeIdentifier)\</IntermediateOutputPath>
<OutputFileName>$(InternalInstallerBaseName)-$(PackageVersion)-$(TargetRuntimeIdentifier)$(ArchiveExtension)</OutputFileName>
<OutputPath>$(InstallersOutputPath)</OutputPath>
<TargetPath>$(InstallersOutputPath)$(OutputFileName)</TargetPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\Framework\src\Microsoft.AspNetCore.App.shfxproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
<OutputItemType>_ResolvedFxProjects</OutputItemType>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.Common.targets" />
<Target Name="GetTargetPath" Returns="$(TargetPath)" />
<Target Name="Build" DependsOnTargets="ResolveProjectReferences;GetTargetPath">
<MakeDir Directories="$(OutputPath);$(IntermediateOutputPath)" />
<ItemGroup>
<SharedFxAssetFolder Include="%(_ResolvedFxProjects.InstallerAssetPaths)" SharedFxName="%(_ResolvedFxProjects.SharedFxName)" />
<FileToZip Include="%(SharedFxAssetFolder.Identity)\**\*">
<DestinationDir>$(IntermediateOutputPath)shared\%(SharedFxAssetFolder.SharedFxName)\$(PackageVersion)\</DestinationDir>
</FileToZip>
</ItemGroup>
<Copy SourceFiles="@(FileToZip)" DestinationFiles="@(FileToZip->'%(DestinationDir)%(RecursiveDir)%(FileName)%(Extension)')" />
<Exec Condition="'$(ArchiveExtension)' == '.tar.gz'"
Command="tar -czf $(TargetPath) -C $(IntermediateOutputPath) ." />
<ZipDirectory Condition="'$(ArchiveExtension)' == '.zip'"
DestinationFile="$(TargetPath)"
SourceDirectory="$(IntermediateOutputPath)"
Overwrite="true" />
</Target>
</Project>