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

View File

@ -50,7 +50,13 @@ namespace RepoTasks
identity = reader.GetIdentity(); 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}"); Log.LogError($"Unexpected package artifact with id: {identity.Id}");
continue; continue;
@ -73,6 +79,9 @@ namespace RepoTasks
case PackageCategory.Mirror: case PackageCategory.Mirror:
destDir = Path.Combine(DestinationFolder, "mirror"); destDir = Path.Combine(DestinationFolder, "mirror");
break; break;
case PackageCategory.Symbols:
destDir = Path.Combine(DestinationFolder, "symbols");
break;
default: default:
throw new NotImplementedException(); throw new NotImplementedException();
} }

View File

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