Push lineup packages and put symbols in a separate directory
This commit is contained in:
parent
586d3c99c7
commit
e7c5ce6bb9
|
|
@ -5,7 +5,7 @@
|
|||
<ItemGroup>
|
||||
<_PackagesToPush Include="$(BuildDir)*.nupkg" />
|
||||
<_PackagesToPush Include="$(ArtifactsDir)mirror\*.nupkg" />
|
||||
<_LineupPackagesToPush Include="$(BuildDir)*.nupkg" />
|
||||
<_LineupPackagesToPush Include="$(LineupBuildDir)*.nupkg" />
|
||||
</ItemGroup>
|
||||
|
||||
<PushNuGetPackages
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@
|
|||
|
||||
<Target Name="CopyPackagesByCategory">
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -44,16 +44,26 @@ namespace RepoTasks
|
|||
|
||||
foreach (var file in Files)
|
||||
{
|
||||
var isSymbolsPackage = file.ItemSpec.EndsWith(".symbols.nupkg", StringComparison.OrdinalIgnoreCase);
|
||||
|
||||
PackageIdentity identity;
|
||||
using (var reader = new PackageArchiveReader(file.ItemSpec))
|
||||
{
|
||||
identity = reader.GetIdentity();
|
||||
}
|
||||
|
||||
if (!expectedPackages.TryGetCategory(identity.Id, out var category))
|
||||
PackageCategory category;
|
||||
if (isSymbolsPackage)
|
||||
{
|
||||
Log.LogError($"Unexpected package artifact with id: {identity.Id}");
|
||||
continue;
|
||||
category = PackageCategory.Symbols;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!expectedPackages.TryGetCategory(identity.Id, out category))
|
||||
{
|
||||
Log.LogError($"Unexpected package artifact with id: {identity.Id}");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
string destDir;
|
||||
|
|
@ -73,6 +83,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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,5 +11,6 @@ namespace RepoTasks.ProjectModel
|
|||
NoShip,
|
||||
ShipOob,
|
||||
Mirror,
|
||||
Symbols,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue