Browse Source
Avoid api validation for symbol packages
pull/12216/head
Julien Lebosquain
3 years ago
No known key found for this signature in database
GPG Key ID: 1833CAD10ACC46FD
2 changed files with
4 additions and
3 deletions
-
nukebuild/ApiDiffValidation.cs
-
nukebuild/Build.cs
|
|
|
@ -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}"; |
|
|
|
|
|
|
|
@ -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))); |
|
|
|
}); |
|
|
|
|