[ArPow Tarball] Handle SBRP packages in previously source-built artifacts (#11072)

* Add SBRP packages to prev source-built

* Update to new version of prev source-built

* Update SBRP reference

* Don't delete SBRP packages

* Update private source-built version
This commit is contained in:
Dan Seefeldt 2021-07-08 09:35:21 -05:00 committed by GitHub
parent 20e58082fa
commit a5587571df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 42 additions and 12 deletions

View file

@ -49,9 +49,9 @@
<Sha>a3377cccde8639089f99107e2ba5df2c8cbe6394</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="5.0.0-alpha.1.20473.1">
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build-reference-packages" Version="6.0.0-alpha.1.21357.1">
<Uri>https://github.com/dotnet/source-build-reference-packages</Uri>
<Sha>def2e2c6dc5064319250e2868a041a3dc07f9579</Sha>
<Sha>36fb56afdf0ee2fb2e0833bdef98dfde12a0837b</Sha>
<SourceBuild RepoName="source-build-reference-packages" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.SourceBuild.Intermediate.source-build" Version="0.1.0-alpha.1.21318.1">

View file

@ -158,7 +158,7 @@
removed. See https://github.com/dotnet/source-build/issues/2295 -->
<MicrosoftBuildFrameworkVersion>15.7.179</MicrosoftBuildFrameworkVersion>
<MicrosoftBuildUtilitiesCoreVersion>15.7.179</MicrosoftBuildUtilitiesCoreVersion>
<PrivateSourceBuiltArtifactsPackageVersion>0.1.0-6.0.100-bootstrap.4</PrivateSourceBuiltArtifactsPackageVersion>
<PrivateSourceBuiltArtifactsPackageVersion>0.1.0-6.0.100-bootstrap.6</PrivateSourceBuiltArtifactsPackageVersion>
</PropertyGroup>
<!-- Workload manifest package versions -->
<PropertyGroup>

View file

@ -21,6 +21,6 @@
</PropertyGroup>
<!-- Production Dependencies -->
<PropertyGroup>
<PrivateSourceBuiltArtifactsPackageVersion>0.1.0-6.0.100-bootstrap.4</PrivateSourceBuiltArtifactsPackageVersion>
<PrivateSourceBuiltArtifactsPackageVersion>0.1.0-6.0.100-bootstrap.6</PrivateSourceBuiltArtifactsPackageVersion>
</PropertyGroup>
</Project>

View file

@ -19,11 +19,39 @@
<!-- Copy PVP to packages dir in order to package them together -->
<Copy SourceFiles="$(IncludedPackageVersionPropsFile)" DestinationFiles="$(SourceBuiltPackagesPath)PackageVersions.props" />
<!-- Expand SBRP intermediate package into separate folder and remove intermediate package -->
<PropertyGroup>
<SourceBuildReferencePackagesDestination>$(SourceBuiltPackagesPath)SourceBuildReferencePackages/</SourceBuildReferencePackagesDestination>
<SBRPIntermediateWildcard>Microsoft.SourceBuild.Intermediate.source-build-reference-packages*.nupkg</SBRPIntermediateWildcard>
</PropertyGroup>
<ItemGroup>
<SourceBuildReferencePackagesIntermediatePackage Include="$(SourceBuiltPackagesPath)$(SBRPIntermediateWildcard)"/>
</ItemGroup>
<MakeDir Directories="$(SourceBuildReferencePackagesDestination)" />
<ZipFileExtractToDirectory Condition="'@(SourceBuildReferencePackagesIntermediatePackage)' != ''"
SourceArchive="%(SourceBuildReferencePackagesIntermediatePackage.Identity)"
DestinationDirectory="$(SourceBuildReferencePackagesDestination)extractArtifacts/"
OverwriteDestination="true" />
<ItemGroup>
<SourceBuildReferencePackagesNupkgFiles Include="$(SourceBuildReferencePackagesDestination)extractArtifacts/**/*.nupkg" />
</ItemGroup>
<Copy
Condition="'@(SourceBuildReferencePackagesNupkgFiles)' != ''"
SourceFiles="@(SourceBuildReferencePackagesNupkgFiles)"
DestinationFiles="@(SourceBuildReferencePackagesNupkgFiles -> '$(SourceBuildReferencePackagesDestination)%(Filename)%(Extension)')" />
<RemoveDir
Condition="Exists('$(SourceBuildReferencePackagesDestination)extractArtifacts/')"
Directories="$(SourceBuildReferencePackagesDestination)extractArtifacts/" />
<PropertyGroup>
<SourceBuiltTarballName>$(OutputPath)$(SourceBuiltArtifactsTarballName).$(VersionPrefix)-$(VersionSuffix).tar.gz</SourceBuiltTarballName>
</PropertyGroup>
<Exec Command="tar --numeric-owner -czf $(SourceBuiltTarballName) *.nupkg *.props" WorkingDirectory="$(SourceBuiltPackagesPath)" />
<Exec Command="tar --numeric-owner --exclude='$(SBRPIntermediateWildcard)' -czf $(SourceBuiltTarballName) *.nupkg *.props SourceBuildReferencePackages/" WorkingDirectory="$(SourceBuiltPackagesPath)" />
<Message Importance="High" Text="Packaged source-built artifacts to $(SourceBuiltTarballName)" />
</Target>

View file

@ -46,20 +46,22 @@
Inputs="$(MSBuildProjectFullPath)"
Outputs="$(CompletedSemaphorePath)UnpackTarballs.complete" >
<!-- Make this directory here even though we're no
longer unpacking into it because some restore sources are looking
for it. Keeping this because once source-build-reference-packages
is built, the resulting packages will be put here. -->
<MakeDir Directories="$(ReferencePackagesDir)" />
<MakeDir Directories="$(PrebuiltSourceBuiltPackagesPath)" Condition="'$(CustomPrebuiltSourceBuiltPackagesPath)' == ''" />
<Exec Command="tar -xzf $(ExternalTarballsDir)$(SourceBuiltArtifactsTarballName).*.tar.gz"
WorkingDirectory="$(PrebuiltSourceBuiltPackagesPath)"
Condition="'$(CustomPrebuiltSourceBuiltPackagesPath)' == ''" />
<Copy SourceFiles="$(PrebuiltSourceBuiltPackagesPath)PackageVersions.props" DestinationFiles="$(IntermediatePath)SourceBuiltPackageVersions.props" />
<!-- Move SBRP packages to reference packages location -->
<MakeDir Directories="$(ReferencePackagesDir)" />
<ItemGroup>
<UnpackedSourceBuildReferencePackages Include="$(PrebuiltSourceBuiltPackagesPath)SourceBuildReferencePackages/*"/>
</ItemGroup>
<Move SourceFiles="@(UnpackedSourceBuildReferencePackages)" DestinationFiles="$(ReferencePackagesDir)%(Filename)%(Extension)" />
<!-- Setup the PackageVersions.props file to be a combination of SourceBuilt and GennedPackages -->
<Copy SourceFiles="$(PrebuiltSourceBuiltPackagesPath)PackageVersions.props" DestinationFiles="$(IntermediatePath)SourceBuiltPackageVersions.props" />
<PropertyGroup>
<PackageVersionsPropsFile>$(IntermediatePath)PackageVersions.props</PackageVersionsPropsFile>
<PackageVersionsPropsContents>