Copy symbol packages to artifacts/symbols

This commit is contained in:
Nate McMaster 2017-10-09 10:31:42 -07:00
parent 611b6a23ad
commit 869d762641
3 changed files with 12 additions and 2 deletions

View File

@ -209,7 +209,7 @@
<Target Name="SplitPackages">
<ItemGroup>
<PackageArtifactFile Include="$(BuildDir)*.nupkg" Exclude="$(BuildDir)*.symbols.nupkg" />
<PackageArtifactFile Include="$(BuildDir)*.nupkg" />
<ExternalDependencyPackage Include="@(ExternalDependency->WithMetadataValue('Mirror', 'true'))" Category="mirror" />
<_MirroredPackageFiles Include="$(IntermediateMirrorPackageDir)*.nupkg" />
</ItemGroup>

View File

@ -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();
}

View File

@ -11,5 +11,6 @@ namespace RepoTasks.Utilities
NoShip,
ShipOob,
Mirror,
Symbols,
}
}