diff --git a/eng/SourceBuild.Tarball.targets b/eng/SourceBuild.Tarball.targets index 3948a9cc6e..604d96e571 100644 --- a/eng/SourceBuild.Tarball.targets +++ b/eng/SourceBuild.Tarball.targets @@ -1,11 +1,15 @@ + + + '$(TarballSourceDir)%(RecursiveDir)%(Filename)%(Extension)')" /> + + + + + + + + + + + - - - - - - - - - diff --git a/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/RemoveInternetSourcesFromNuGetConfig.cs b/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/RemoveInternetSourcesFromNuGetConfig.cs index 65aa69ac80..05036ed2ed 100755 --- a/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/RemoveInternetSourcesFromNuGetConfig.cs +++ b/tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks.XPlat/RemoveInternetSourcesFromNuGetConfig.cs @@ -34,6 +34,13 @@ public class RemoveInternetSourcesFromNuGetConfig : Task /// public string[] KeepFeedPrefixes { get; set; } + /// + /// A list of prefix strings that make the task remove a package source unconditionally. For + /// example, a source named 'darc-pub-dotnet-aspnetcore-e81033e' will be removed if the prefix + /// 'darc-pub-dotnet-aspnetcore-' is in this list. + /// + public string[] RemoveFeedPrefixes { get; set; } + public override bool Execute() { XDocument d = XDocument.Load(NuGetConfigFile); @@ -52,6 +59,13 @@ public override bool Execute() return true; } + if (RemoveFeedPrefixes + ?.Any(prefix => feedName.StartsWith(prefix, StringComparison.OrdinalIgnoreCase)) + == true) + { + return false; + } + string feedUrl = e.Attribute("value").Value; if (OfflineBuild) {