Zip store and deps together
This commit is contained in:
parent
1160784d08
commit
3ae799c9c8
|
|
@ -5,9 +5,10 @@
|
|||
<MetaPackagePath>$(RepositoryRoot)src\Microsoft.AspNetCore.RuntimeStore\</MetaPackagePath>
|
||||
<MetaPackageFile>$(MetaPackagePath)Microsoft.AspNetCore.RuntimeStore.csproj</MetaPackageFile>
|
||||
<WorkingDirectory>$(MetaPackagePath)bin\work\</WorkingDirectory>
|
||||
<OutputPath>$(MetaPackagePath)bin\packageCache\</OutputPath>
|
||||
<PackageCacheOutputPath>$(MetaPackagePath)bin\packageCache\</PackageCacheOutputPath>
|
||||
<DepsOutputPath>$(MetaPackagePath)bin\deps\</DepsOutputPath>
|
||||
<ArtifactsDir>$(RepositoryRoot)artifacts\</ArtifactsDir>
|
||||
<ArtifactsZipDir>$(ArtifactsDir)zip\</ArtifactsZipDir>
|
||||
<TempDir>$(ArtifactsDir)temp\</TempDir>
|
||||
<ToolsDir>$(RepositoryRoot)tools\</ToolsDir>
|
||||
<DependencyBuildDirectory>$(RepositoryRoot).deps\build\</DependencyBuildDirectory>
|
||||
|
|
@ -41,7 +42,6 @@
|
|||
<OutputZipSufix Condition="'$(OSPlatform)' == 'macOS'">osx</OutputZipSufix>
|
||||
|
||||
<OutputZip>$(ArtifactsDir)Build.RuntimeStore.$(OutputZipSufix)-$(VersionSuffix).zip</OutputZip>
|
||||
<DepsOutputZip>$(ArtifactsDir)Build.Deps.$(OutputZipSufix)-$(VersionSuffix).zip</DepsOutputZip>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
@ -59,23 +59,29 @@
|
|||
</RIDs>
|
||||
</ItemGroup>
|
||||
|
||||
<RemoveDir Directories="$(OutputPath)" />
|
||||
<RemoveDir Directories="$(PackageCacheOutputPath)" />
|
||||
<RemoveDir Directories="$(WorkingDirectory)%(RIDs.Identity)\" />
|
||||
<Exec Command="dotnet store --manifest $(MetaPackageFile) --configuration Release --framework netcoreapp2.0 --runtime %(RIDs.Identity) --output $(OutputPath) --framework-version 2.0.0-* --working-dir $(WorkingDirectory)%(RIDs.Identity)/" />
|
||||
|
||||
<Exec Command="dotnet store --manifest $(MetaPackageFile) --configuration Release --framework netcoreapp2.0 --runtime %(RIDs.Identity) --output $(PackageCacheOutputPath) --framework-version 2.0.0-* --working-dir $(WorkingDirectory)%(RIDs.Identity)/" />
|
||||
<MsBuild Projects="$(MetaPackageFile)" Targets="CollectDeps" Properties="DepsOutputPath=$(DepsOutputPath)"/>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageCacheFiles Include="$(OutputPath)**\*" />
|
||||
<PackageStoreManifestFiles Include="$(OutputPath)%(RIDs.PlatformDir)\**\artifact.xml">
|
||||
<PackageStoreManifestFiles Include="$(PackageCacheOutputPath)%(RIDs.PlatformDir)\**\artifact.xml">
|
||||
<DestinationFile>manifest.%(RIDs.Identity).xml</DestinationFile>
|
||||
</PackageStoreManifestFiles>
|
||||
<PackageCacheFiles Include="$(PackageCacheOutputPath)**\*" Exclude="$(PackageCacheOutputPath)**\artifact.xml" />
|
||||
<DepsFiles Include="$(DepsOutputPath)**\*" />
|
||||
</ItemGroup>
|
||||
|
||||
<ZipArchive File="$(OutputZip)" SourceFiles="@(PackageCacheFiles)" WorkingDirectory="$(OutputPath)" />
|
||||
<ZipArchive File="$(DepsOutputZip)" SourceFiles="@(DepsFiles)" WorkingDirectory="$(DepsOutputPath)" />
|
||||
<Move SourceFiles="%(PackageStoreManifestFiles.FullPath)" DestinationFiles="$(ArtifactsDir)%(PackageStoreManifestFiles.DestinationFile)" />
|
||||
|
||||
<Copy SourceFiles="%(PackageStoreManifestFiles.FullPath)" DestinationFiles="$(ArtifactsDir)%(PackageStoreManifestFiles.DestinationFile)" />
|
||||
<Copy SourceFiles="@(PackageCacheFiles)" DestinationFolder="$(ArtifactsZipDir)store\%(RecursiveDir)" />
|
||||
<Copy SourceFiles="@(DepsFiles)" DestinationFolder="$(ArtifactsZipDir)additionalDeps\%(RecursiveDir)" />
|
||||
|
||||
<ItemGroup>
|
||||
<OutputZipFiles Include="$(ArtifactsZipDir)**\*" />
|
||||
</ItemGroup>
|
||||
|
||||
<ZipArchive File="$(OutputZip)" SourceFiles="@(OutputZipFiles)" WorkingDirectory="$(ArtifactsZipDir)" />
|
||||
|
||||
<!--Drop a nuspec file in artifacts for packing zip files into a nupkg-->
|
||||
<Copy SourceFiles="$(RepositoryRoot)build\Build.RuntimeStore.nuspec" DestinationFolder="$(ArtifactsDir)" Condition="'$(OSPlatform)'=='Windows'" />
|
||||
|
|
|
|||
|
|
@ -12,9 +12,11 @@
|
|||
|
||||
<Target Name="CollectDeps" DependsOnTargets="Restore;RunResolvePackageDependencies">
|
||||
<ItemGroup>
|
||||
<DepsFiles Include="%(FileDefinitions.ResolvedPath)" Condition="$([System.Text.RegularExpressions.Regex]::IsMatch('%(Identity)', '.*?\.HostingStartup\.deps\.json')) " />
|
||||
<DepsFiles Include="%(FileDefinitions.ResolvedPath)" Condition="$([System.Text.RegularExpressions.Regex]::IsMatch('%(Identity)', '.*?\.HostingStartup\.deps\.json')) " >
|
||||
<PackageName>$([System.String]::Copy('%(Filename)').Replace('.deps',''))</PackageName>
|
||||
</DepsFiles>
|
||||
</ItemGroup>
|
||||
|
||||
<Copy SourceFiles="@(DepsFiles)" DestinationFolder="$(DepsOutputPath)\Microsoft.NETCore.App\2.0.0\" />
|
||||
<Copy SourceFiles="%(DepsFiles.FullPath)" DestinationFiles="$(DepsOutputPath)\%(DepsFiles.PackageName)\Microsoft.NETCore.App\2.0.0\deps.json" />
|
||||
</Target>
|
||||
</Project>
|
||||
Loading…
Reference in New Issue