Prepare source-build for prebuiltless build

This commit is contained in:
Davis Goodin 2021-10-21 17:39:47 -05:00
parent 0d4e77331c
commit 24f68585c3
4 changed files with 26 additions and 3 deletions

View file

@ -159,6 +159,19 @@
removed. See https://github.com/dotnet/source-build/issues/2295 -->
<MicrosoftBuildFrameworkVersion>15.7.179</MicrosoftBuildFrameworkVersion>
<MicrosoftBuildUtilitiesCoreVersion>15.7.179</MicrosoftBuildUtilitiesCoreVersion>
<!--
Building .NET from source depends on one or two tar.gz files depending on the branch's current
source-buildability status.
PrivateSourceBuiltArtifactsPackageVersion is a tar.gz of .NET build outputs from a previous
build needed to build the current version of .NET. This is always defined, because .NET needs
to be bootstrappable at any point in time.
PrivateSourceBuiltPrebuiltsPackageVersion is a tar.gz of assets downloaded from the internet
that are needed to build the current version of .NET. Early in the lifecycle of a .NET major
or minor release, prebuilts may be needed. When the release is mature, prebuilts are not
necessary, and this property is removed from the file.
-->
<PrivateSourceBuiltArtifactsPackageVersion>0.1.0-6.0.100-bootstrap.29</PrivateSourceBuiltArtifactsPackageVersion>
<PrivateSourceBuiltPrebuiltsPackageVersion>0.1.0-6.0.100-36</PrivateSourceBuiltPrebuiltsPackageVersion>
</PropertyGroup>

View file

@ -292,7 +292,9 @@
<ItemGroup>
<ArtifactUrls Include="$(SourceBuiltArtifactsTarballUrl)$(SourceBuiltArtifactsTarballName).$(PrivateSourceBuiltArtifactsPackageVersion).tar.gz" />
<ArtifactUrls Include="$(SourceBuiltArtifactsTarballUrl)$(SourceBuiltPrebuiltsTarballName).$(PrivateSourceBuiltPrebuiltsPackageVersion).tar.gz" />
<ArtifactUrls
Include="$(SourceBuiltArtifactsTarballUrl)$(SourceBuiltPrebuiltsTarballName).$(PrivateSourceBuiltPrebuiltsPackageVersion).tar.gz"
Condition="'$(PrivateSourceBuiltPrebuiltsPackageVersion)' != ''" />
</ItemGroup>
<WriteLinesToFile

View file

@ -133,7 +133,8 @@
</Target>
<Target Name="CreatePrebuiltsTarball"
AfterTargets="Build">
AfterTargets="Build"
Condition="Exists('$(ResultingPrebuiltPackagesDir)')">
<PropertyGroup>
<TarballFileVersion>$(PrivateSourceBuiltPrebuiltsPackageVersionPrefix)$([MSBuild]::Add($(PrivateSourceBuiltPrebuiltsPackageVersionSuffix), 1))</TarballFileVersion>

View file

@ -46,7 +46,14 @@
WorkingDirectory="$(PrebuiltSourceBuiltPackagesPath)"
Condition="'$(CustomPrebuiltSourceBuiltPackagesPath)' == ''" />
<Exec Command="tar -xzf $(ExternalTarballsDir)$(SourceBuiltPrebuiltsTarballName).*.tar.gz"
<!--
Check for a prebuilt dependency tarball and extract if exists. If there isn't one, we expect
the build to be working without prebuilts.
-->
<ItemGroup>
<SourceBuiltPrebuiltsTarballFile Include="$(ExternalTarballsDir)$(SourceBuiltPrebuiltsTarballName).*.tar.gz" />
</ItemGroup>
<Exec Command="tar -xzf %(SourceBuiltPrebuiltsTarballFile.FullPath)"
WorkingDirectory="$(PrebuiltPackagesPath)" />
<!-- Move SBRP packages to reference packages location -->