forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Infra for regeneration of third-party-notices file (dotnet#60091)
* Infra for regeneration of third-party-notices file * Update eng/regenerate-third-party-notices.proj Co-authored-by: Davis Goodin <dagood@users.noreply.github.com> * Addressing PR comments * Updated copyright in all .cs files * Update dotnet/liner repo name * Add dotnet/emsdk to the list Co-authored-by: Davis Goodin <dagood@users.noreply.github.com>
- Loading branch information
1 parent
93957c6
commit ca8ddae
Showing
9 changed files
with
759 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<Project Sdk="Microsoft.Build.NoTargets"> | ||
|
||
<UsingTask TaskName="RegenerateThirdPartyNotices" AssemblyFile="$(InstallerTasksAssemblyPath)" /> | ||
|
||
<Target Name="RegenerateThirdPartyNotices" AfterTargets="Build"> | ||
<PropertyGroup> | ||
<TpnFile>$(InstallerProjectRoot)pkg\THIRD-PARTY-NOTICES.TXT</TpnFile> | ||
</PropertyGroup> | ||
|
||
<!-- | ||
Repo configuration. Upstreams, but also more: the TPN in dotnet/runtime serves many repos outside | ||
its graph, because dotnet/runtime produces the installer that ends up placing the single TPN file | ||
in the dotnet home directory. | ||
--> | ||
<ItemGroup> | ||
<TpnRepo Include="dotnet/runtime" /> | ||
<TpnRepo Include="dotnet/aspnetcore" /> | ||
<TpnRepo Include="dotnet/installer" /> | ||
<TpnRepo Include="dotnet/roslyn-analyzers" /> | ||
<TpnRepo Include="dotnet/templating" /> | ||
<TpnRepo Include="dotnet/winforms" /> | ||
<TpnRepo Include="dotnet/wpf" /> | ||
|
||
<!-- | ||
Additional repos that should be included but don't have any third-party-notices files: | ||
dotnet/efcore | ||
dotnet/emsdk | ||
dotnet/extensions | ||
dotnet/icu | ||
dotnet/sdk | ||
dotnet/windowsdesktop | ||
dotnet/linker | ||
--> | ||
|
||
<TpnRepo Condition="'%(TpnRepo.Branch)' == ''" Branch="main" /> | ||
|
||
<PotentialTpnPath Include="THIRD-PARTY-NOTICES.TXT" /> | ||
<PotentialTpnPath Include="THIRD-PARTY-NOTICES.txt" /> | ||
<PotentialTpnPath Include="THIRD-PARTY-NOTICES" /> | ||
<PotentialTpnPath Include="THIRDPARTYNOTICES.TXT" /> | ||
<PotentialTpnPath Include="THIRDPARTYNOTICES.txt" /> | ||
</ItemGroup> | ||
|
||
<RegenerateThirdPartyNotices | ||
TpnFile="$(TpnFile)" | ||
PotentialTpnPaths="@(PotentialTpnPath)" | ||
TpnRepos="@(TpnRepo)" /> | ||
|
||
<Message Text="$(MSBuildProjectName) -> $(TpnFile)" Importance="High" /> | ||
</Target> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/tasks/installer.tasks/StaticFileRegeneration/EnumerableExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
|
||
namespace Microsoft.DotNet.Build.Tasks | ||
{ | ||
internal static class EnumerableExtensions | ||
{ | ||
public static IEnumerable<T> NullAsEmpty<T>(this IEnumerable<T> source) | ||
{ | ||
return source ?? Enumerable.Empty<T>(); | ||
} | ||
} | ||
} |
Oops, something went wrong.