Include third-party-notices.txt in all packages (#20166)

* Include third-party-notices.txt in all packages

* Fix version test filename
This commit is contained in:
William Godbe 2020-03-27 10:15:32 -07:00 committed by GitHub
parent 68908b5b26
commit 1040be3588
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 29 additions and 9 deletions

View File

@ -104,6 +104,14 @@
<BuildHelixPayload Condition="'$(BuildHelixPayload)' == '' AND '$(IsTestProject)' == 'true'">true</BuildHelixPayload>
</PropertyGroup>
<PropertyGroup>
<PackageThirdPartyNoticesFile Condition="'$(PackageThirdPartyNoticesFile)' == ''">$(RepoRoot)THIRD-PARTY-NOTICES.TXT</PackageThirdPartyNoticesFile>
</PropertyGroup>
<ItemGroup Condition="'$(IsPackable)' == 'true'">
<None Include="$(PackageThirdPartyNoticesFile)" Pack="true" PackagePath="." />
</ItemGroup>
<ItemGroup Condition="'$(Language)' == 'C#' AND '$(IsReferenceAssemblyProject)' == 'true'">
<Compile Include="$(SharedSourceRoot)ReferenceAssemblyInfo.cs" LinkBase="Properties" />
</ItemGroup>

View File

@ -23,6 +23,7 @@
<NuspecProperty Include="componentsversion=$(ComponentsPackageVersion)" />
<NuspecProperty Include="razorversion=$(MicrosoftAspNetCoreRazorDesignPackageVersion)" />
<NuspecProperty Include="blazormonoversion=$(MicrosoftAspNetCoreBlazorMonoPackageVersion)" />
<NuspecProperty Include="PackageThirdPartyNoticesFile=$(PackageThirdPartyNoticesFile)" />
</ItemGroup>
<ItemGroup>

View File

@ -8,7 +8,7 @@
</metadata>
<files>
$CommonFileElements$
<file src="..\..\..\THIRD-PARTY-NOTICES.txt" />
<file src="$PackageThirdPartyNoticesFile$" target=".\THIRD-PARTY-NOTICES.txt" />
<file src="build\**" target="build" />
<file src="targets\**" target="targets" />
<file src="$publishdir$**\*" target="tools/" />

View File

@ -33,6 +33,7 @@
<NuspecProperty Include="publishDir=$(PublishDir)" />
<NuspecProperty Include="componentsrootdir=..\..\..\" />
<NuspecProperty Include="blazorversion=$(PackageVersion)" />
<NuspecProperty Include="PackageThirdPartyNoticesFile=$(PackageThirdPartyNoticesFile)" />
</ItemGroup>
</Project>

View File

@ -7,6 +7,6 @@
$CommonFileElements$
<file src="build\**" target="build" />
<file src="$publishDir$**\*" target="tools" />
<file src="$componentsrootdir$THIRD-PARTY-NOTICES.txt" target=".\THIRD-PARTY-NOTICES.txt" />
<file src="$PackageThirdPartyNoticesFile$" target=".\THIRD-PARTY-NOTICES.txt" />
</files>
</package>

View File

@ -54,6 +54,7 @@
<NuspecProperty Condition="'$(DotNetBuildFromSource)' != 'true'" Include="systemComponentModelAnnotationsPackageVersion=$(SystemComponentModelAnnotationsPackageVersion)" />
<NuspecProperty Include="AssemblyName=$(AssemblyName)" />
<NuspecProperty Include="OutputPath=$(OutputPath)" />
<NuspecProperty Include="PackageThirdPartyNoticesFile=$(PackageThirdPartyNoticesFile)" />
</ItemGroup>
</Project>

View File

@ -21,6 +21,6 @@
<file src="$OutputPath$**\$AssemblyName$.dll" target="lib\" />
<file src="$OutputPath$**\$AssemblyName$.pdb" target="lib\" />
<file src="$OutputPath$**\$AssemblyName$.xml" target="lib\" />
<file src="..\..\THIRD-PARTY-NOTICES.txt" target=".\THIRD-PARTY-NOTICES.txt" />
<file src="$PackageThirdPartyNoticesFile$" target=".\THIRD-PARTY-NOTICES.txt" />
</files>
</package>

View File

@ -15,6 +15,6 @@
<file src="$OutputPath$**\$AssemblyName$.dll" target="lib\" />
<file src="$OutputPath$**\$AssemblyName$.pdb" target="lib\" />
<file src="$OutputPath$**\$AssemblyName$.xml" target="lib\" />
<file src="..\..\THIRD-PARTY-NOTICES.txt" target=".\THIRD-PARTY-NOTICES.txt" />
<file src="$PackageThirdPartyNoticesFile$" target=".\THIRD-PARTY-NOTICES.txt" />
</files>
</package>

View File

@ -16,6 +16,8 @@
<!-- So we can use the tool from source within the repo without having to pack -->
<BlazorToolsDir>$(MSBuildThisFileDirectory)Blazor\Build\src\bin\$(Configuration)\$(DefaultNetCoreTargetFramework)\</BlazorToolsDir>
<PackageThirdPartyNoticesFile>$(MSBuildThisFileDirectory)THIRD-PARTY-NOTICES.txt</PackageThirdPartyNoticesFile>
</PropertyGroup>
<PropertyGroup>

View File

@ -4,8 +4,6 @@
</PropertyGroup>
<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)THIRD-PARTY-NOTICES.txt" Pack="true" PackagePath="." />
<!-- Add a project dependency without reference output assemblies to enforce build order -->
<!-- Applying workaround for https://github.com/microsoft/msbuild/issues/2661 and https://github.com/dotnet/sdk/issues/952 -->
<ProjectReference

View File

@ -67,7 +67,7 @@ This package is an internal implementation of the .NET Core SDK and is not meant
<!-- There is no way to suppress the .dev.runtimeconfig.json generation. -->
<ProjectRuntimeConfigDevFilePath>$(IntermediateOutputPath)ignoreme.dev.runtimeconfig.json</ProjectRuntimeConfigDevFilePath>
<VersionFileIntermediateOutputPath>$(IntermediateOutputPath).version</VersionFileIntermediateOutputPath>
<VersionFileIntermediateOutputPath>$(IntermediateOutputPath)$(SharedFxName).versions.txt</VersionFileIntermediateOutputPath>
<!-- The project representing the shared framework doesn't produce a .NET assembly or symbols. -->
<DebugType>none</DebugType>
@ -497,4 +497,13 @@ This package is an internal implementation of the .NET Core SDK and is not meant
</ItemGroup>
</Target>
<Target Name="IncludeVersionFile"
DependsOnTargets="GenerateSharedFxVersionsFiles"
BeforeTargets="_GetPackageFiles">
<ItemGroup>
<None Include="$(VersionFileIntermediateOutputPath)" Pack="true" PackagePath="." />
</ItemGroup>
</Target>
</Project>

View File

@ -131,7 +131,7 @@ namespace Microsoft.AspNetCore
[Fact]
public void ItContainsVersionFile()
{
var versionFile = Path.Combine(_sharedFxRoot, ".version");
var versionFile = Path.Combine(_sharedFxRoot, "Microsoft.AspNetCore.App.versions.txt");
AssertEx.FileExists(versionFile);
var lines = File.ReadAllLines(versionFile);
Assert.Equal(2, lines.Length);

View File

@ -23,6 +23,7 @@
</GetCurrentProjectStaticWebAssetsDependsOn>
<IdentityUIFrameworkVersion Condition="'$(IdentityUIFrameworkVersion)' == ''">Bootstrap4</IdentityUIFrameworkVersion>
<PackageThirdPartyNoticesFile>$(MSBuildThisFileDirectory)THIRD-PARTY-NOTICES.TXT</PackageThirdPartyNoticesFile>
</PropertyGroup>
@ -32,7 +33,6 @@
<None Include="build\*" Pack="true" PackagePath="build\" />
<None Include="buildMultiTargeting\*" Pack="true" PackagePath="buildMultiTargeting\" />
<None Include="buildTransitive\*" Pack="true" PackagePath="buildTransitive\" />
<None Include="THIRD-PARTY-NOTICES.txt" Pack="true" PackagePath="/THIRD-PARTY-NOTICES.txt" />
</ItemGroup>
<ItemGroup>