From 869d7626418eae94ef19e249323e99ad5e1bfad9 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Mon, 9 Oct 2017 10:31:42 -0700 Subject: [PATCH] Copy symbol packages to artifacts/symbols --- build/repo.targets | 2 +- build/tasks/CopyPackagesToSplitFolders.cs | 11 ++++++++++- build/tasks/Utilities/PackageCategory.cs | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/build/repo.targets b/build/repo.targets index b2f0305756..1aa7ad2e18 100644 --- a/build/repo.targets +++ b/build/repo.targets @@ -209,7 +209,7 @@ - + <_MirroredPackageFiles Include="$(IntermediateMirrorPackageDir)*.nupkg" /> diff --git a/build/tasks/CopyPackagesToSplitFolders.cs b/build/tasks/CopyPackagesToSplitFolders.cs index ebb1b37bf5..b9ead3f5b6 100644 --- a/build/tasks/CopyPackagesToSplitFolders.cs +++ b/build/tasks/CopyPackagesToSplitFolders.cs @@ -50,7 +50,13 @@ namespace RepoTasks identity = reader.GetIdentity(); } - if (!expectedPackages.TryGetCategory(identity.Id, out var category)) + var isSymbolsPackage = file.ItemSpec.EndsWith(".symbols.nupkg", StringComparison.OrdinalIgnoreCase); + PackageCategory category; + if (isSymbolsPackage) + { + category = PackageCategory.Symbols; + } + else if (!expectedPackages.TryGetCategory(identity.Id, out category)) { Log.LogError($"Unexpected package artifact with id: {identity.Id}"); continue; @@ -73,6 +79,9 @@ namespace RepoTasks case PackageCategory.Mirror: destDir = Path.Combine(DestinationFolder, "mirror"); break; + case PackageCategory.Symbols: + destDir = Path.Combine(DestinationFolder, "symbols"); + break; default: throw new NotImplementedException(); } diff --git a/build/tasks/Utilities/PackageCategory.cs b/build/tasks/Utilities/PackageCategory.cs index f51142bdb7..78afe9cbce 100644 --- a/build/tasks/Utilities/PackageCategory.cs +++ b/build/tasks/Utilities/PackageCategory.cs @@ -11,5 +11,6 @@ namespace RepoTasks.Utilities NoShip, ShipOob, Mirror, + Symbols, } }