Avoid api validation for symbol packages
This commit is contained in:
@@ -38,7 +38,8 @@ public static class ApiDiffValidation
|
||||
var left = new List<string>();
|
||||
var right = new List<string>();
|
||||
|
||||
var suppressionFile = Path.Combine(suppressionFilesFolder, GetPackageId(packagePath) + ".nupkg.xml");
|
||||
var packageId = GetPackageId(packagePath);
|
||||
var suppressionFile = Path.Combine(suppressionFilesFolder, packageId + ".nupkg.xml");
|
||||
|
||||
// Don't use Path.Combine with these left and right tool parameters.
|
||||
// Microsoft.DotNet.ApiCompat.Tool is stupid and treats '/' and '\' as different assemblies in suppression files.
|
||||
@@ -57,7 +58,7 @@ public static class ApiDiffValidation
|
||||
e.target == baselineDll.target && e.entry.Name == baselineDll.entry.Name);
|
||||
if (targetDll.entry is null)
|
||||
{
|
||||
throw new InvalidOperationException($"Some assemblies are missing in the new package: {baselineDll.entry.Name} for {baselineDll.target}");
|
||||
throw new InvalidOperationException($"Some assemblies are missing in the new package {packageId}: {baselineDll.entry.Name} for {baselineDll.target}");
|
||||
}
|
||||
|
||||
var targetDllPath = $"target/{targetDll.target}/{targetDll.entry.Name}";
|
||||
|
||||
+1
-1
@@ -288,7 +288,7 @@ partial class Build : NukeBuild
|
||||
.Executes(async () =>
|
||||
{
|
||||
await Task.WhenAll(
|
||||
Directory.GetFiles(Parameters.NugetRoot).Select(nugetPackage => ApiDiffValidation.ValidatePackage(
|
||||
Directory.GetFiles(Parameters.NugetRoot, "*.nupkg").Select(nugetPackage => ApiDiffValidation.ValidatePackage(
|
||||
ApiCompatTool, nugetPackage, Parameters.ApiValidationBaseline,
|
||||
Parameters.ApiValidationSuppressionFiles, Parameters.UpdateApiValidationSuppression)));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user