Skip to content
This repository has been archived by the owner on Apr 16, 2020. It is now read-only.

Commit

Permalink
Skip satellite assemblies when testing NuGet packages. (#383)
Browse files Browse the repository at this point in the history
  • Loading branch information
ejball authored and ctaggart committed May 23, 2019
1 parent 0f27f34 commit c9c39ca
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion dotnet-sourcelink/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ public static int TestNupkg(string path, List<string> files, IAuthenticationHead
{
files.Add(pdb);
}
else
else if (!IsSatelliteAssembly(dll, dlls))
{
files.Add(dll);
}
Expand Down Expand Up @@ -329,6 +329,12 @@ public static int TestNupkg(string path, List<string> files, IAuthenticationHead
return errors;
}

private static bool IsSatelliteAssembly(string path, List<string> dlls)
{
var match = Regex.Match(path, @"^(.*)/[^/]+/([^/]+).resources.dll$");
return match.Success && dlls.Contains($"{match.Groups[1]}/{match.Groups[2]}.dll");
}

public static void Test(CommandLineApplication command)
{
command.Description = "test each URL and verify that the checksums match";
Expand Down

0 comments on commit c9c39ca

Please sign in to comment.