Merge pull request #12271 from MichaelSimons/issue-2489

Handle workload manifests as text-only packages in source-build
This commit is contained in:
Michael Simons 2021-10-12 09:02:01 -05:00 committed by GitHub
commit 3a434f6fd7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 67 additions and 8 deletions

View file

@ -90,12 +90,11 @@ jobs:
artifact: $(Agent.JobName)_Artifacts_Attempt$(System.JobAttempt) artifact: $(Agent.JobName)_Artifacts_Attempt$(System.JobAttempt)
displayName: Publish Source Build Artifacts displayName: Publish Source Build Artifacts
# TODO: Re-enable once https://github.com/dotnet/source-build/issues/2489 is fixed. - script: |
# - script: | set -x
# set -x
# docker run --rm -v $(_TarballDir):/tarball -w /tarball $(_Container) ./build.sh --run-smoke-test docker run --rm -v $(_TarballDir):/tarball -w /tarball $(_Container) ./build.sh --run-smoke-test
# displayName: Run Tests displayName: Run Tests
- template: /src/SourceBuild/Arcade/eng/common/templates/steps/source-build-publish-logs.yml - template: /src/SourceBuild/Arcade/eng/common/templates/steps/source-build-publish-logs.yml
parameters: parameters:

View file

@ -335,6 +335,59 @@
" /> " />
</ItemGroup> </ItemGroup>
<ItemGroup>
<!-- ttf, woff, woff2, eot are permissible font related content -->
<AllowedTextOnlyExtensions Include="
.-;
.bowerrc;
.config;
.cs;
.cshtml;
.csproj;
.css;
.db;
.editorconfig;
.env;
.env.development;
.eot;
.fs;
.fsproj;
.gitignore;
.gitkeep;
.html;
.ico;
.js;
.json;
.map;
.md;
.nuspec;
.otf;
.png;
.props;
.proto;
.razor;
.sln;
.svg;
.targets;
.ts;
.ttf;
.tsx;
.txt;
.vb;
.vbproj;
.woff;
.woff2;
browserslist;
browserslistrc;
LICENSE;" />
<UnsupportedTextOnlyPackageContent Include="@(TextOnlyPackageContent)" />
<UnsupportedTextOnlyPackageContent Remove="$(TextOnlyDirectory)/**/*$([System.String]::Copy('%(AllowedTextOnlyExtensions.Identity)').ToLowerInvariant())" />
<UnsupportedTextOnlyPackageContent Remove="$(TextOnlyDirectory)/**/*$([System.String]::Copy('%(AllowedTextOnlyExtensions.Identity)').ToUpperInvariant())" />
</ItemGroup>
<Error Text="Unsupported content found in text-only packages: @(UnsupportedTextOnlyPackageContent)" Condition=" '@(UnsupportedTextOnlyPackageContent)' != '' " />
<Copy <Copy
SourceFiles="@(TextOnlyPackageContent)" SourceFiles="@(TextOnlyPackageContent)"
DestinationFiles="@(TextOnlyPackageContent->'$(TextOnlyPackageTarballDir)$(DirectoryName)/%(RecursiveDir)%(Filename)%(Extension)')" /> DestinationFiles="@(TextOnlyPackageContent->'$(TextOnlyPackageTarballDir)$(DirectoryName)/%(RecursiveDir)%(Filename)%(Extension)')" />
@ -342,3 +395,4 @@
</Target> </Target>
</Project> </Project>

View file

@ -43,6 +43,12 @@
<PackageDownload Include="Microsoft.DotNet.Web.Spa.ProjectTemplates.5.0" Version="[$(AspNetCorePackageVersionFor50Templates)]" /> <PackageDownload Include="Microsoft.DotNet.Web.Spa.ProjectTemplates.5.0" Version="[$(AspNetCorePackageVersionFor50Templates)]" />
<PackageDownload Include="Microsoft.DotNet.Web.Spa.ProjectTemplates.6.0" Version="[$(AspNetCorePackageVersionFor60Templates)]" /> <PackageDownload Include="Microsoft.DotNet.Web.Spa.ProjectTemplates.6.0" Version="[$(AspNetCorePackageVersionFor60Templates)]" />
<PackageDownload Include="Microsoft.NET.Sdk.Android.Manifest-6.0.100" Version="[$(XamarinAndroidWorkloadManifestVersion)]" />
<PackageDownload Include="Microsoft.NET.Sdk.iOS.Manifest-6.0.100" Version="[$(XamarinIOSWorkloadManifestVersion)]" />
<PackageDownload Include="Microsoft.NET.Sdk.MacCatalyst.Manifest-6.0.100" Version="[$(XamarinMacCatalystWorkloadManifestVersion)]" />
<PackageDownload Include="Microsoft.NET.Sdk.macOS.Manifest-6.0.100" Version="[$(XamarinMacOSWorkloadManifestVersion)]" />
<PackageDownload Include="Microsoft.NET.Sdk.Maui.Manifest-6.0.100" Version="[$(MauiWorkloadManifestVersion)]" />
<PackageDownload Include="Microsoft.NET.Sdk.tvOS.Manifest-6.0.100" Version="[$(XamarinTvOSWorkloadManifestVersion)]" />
<PackageDownload Include="Microsoft.NET.Workload.Emscripten.Manifest-6.0.100" Version="[$(EmscriptenWorkloadManifestVersion)]" /> <PackageDownload Include="Microsoft.NET.Workload.Emscripten.Manifest-6.0.100" Version="[$(EmscriptenWorkloadManifestVersion)]" />
<PackageDownload Include="Microsoft.NET.Workload.Mono.ToolChain.Manifest-6.0.100" Version="[$(MonoWorkloadManifestVersion)]" /> <PackageDownload Include="Microsoft.NET.Workload.Mono.ToolChain.Manifest-6.0.100" Version="[$(MonoWorkloadManifestVersion)]" />
</ItemGroup> </ItemGroup>

View file

@ -522,6 +522,7 @@ function runXmlDocTests() {
aspnetcoreappIgnoreList=( aspnetcoreappIgnoreList=(
Microsoft.AspNetCore.App.Analyzers.xml Microsoft.AspNetCore.App.Analyzers.xml
Microsoft.AspNetCore.App.CodeFixes.xml
Microsoft.Extensions.Logging.Generators.resources.xml Microsoft.Extensions.Logging.Generators.resources.xml
Microsoft.Extensions.Logging.Generators.xml Microsoft.Extensions.Logging.Generators.xml
) )

View file

@ -11,7 +11,7 @@
</ItemGroup> </ItemGroup>
<!-- Restore workload manifests via PackageReference --> <!-- Restore workload manifests via PackageReference -->
<ItemGroup Condition="'$(DotNetBuildFromSource)' != 'true'"> <ItemGroup>
<BundledManifestsForPackageDownload Include="@(BundledManifests)" > <BundledManifestsForPackageDownload Include="@(BundledManifests)" >
<Version>[%(Version)]</Version> <Version>[%(Version)]</Version>
</BundledManifestsForPackageDownload> </BundledManifestsForPackageDownload>
@ -26,8 +26,7 @@
</ItemGroup> </ItemGroup>
<Target Name="LayoutManifests" <Target Name="LayoutManifests"
DependsOnTargets="LayoutManifestsForSDK;LayoutManifestsForMSI" DependsOnTargets="LayoutManifestsForSDK;LayoutManifestsForMSI"/>
Condition="'$(DotNetBuildFromSource)' != 'true'"/>
<Target Name="LayoutManifestsForSDK" <Target Name="LayoutManifestsForSDK"
DependsOnTargets="SetupBundledComponents;GenerateManifestVersions"> DependsOnTargets="SetupBundledComponents;GenerateManifestVersions">