Skip to content

Commit a4a6210

Browse files
authored
Add handling for symbol package suffix in folder name (#3368)
1 parent 21c9fb8 commit a4a6210

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

scripts/extract-nupkg-files.ps1

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ function Get-NuGetPackageInfo {
1515
try {
1616
# Get the folder name as fallback (this is the package ID)
1717
$packageId = Split-Path $ExtractedPath -Leaf
18+
$isSymbols = $packageId.EndsWith(".symbols")
1819

1920
# Try to find the .nuspec file to get the version
2021
$nuspecFile = Get-ChildItem -Path $ExtractedPath -Filter "*.nuspec" -Recurse | Select-Object -First 1
@@ -25,11 +26,18 @@ function Get-NuGetPackageInfo {
2526
$version = $nuspec.package.metadata.version
2627

2728
# Return folder name based on whether version contains dash
28-
if ($version.Contains('-')) {
29-
return "$packageId-0.0.0-preview.0"
29+
$folderName = if ($version.Contains('-')) {
30+
"$packageId-0.0.0-preview.0"
3031
} else {
31-
return "$packageId-0.0.0"
32+
"$packageId-0.0.0"
3233
}
34+
35+
# Append .symbols suffix for symbol packages
36+
if ($isSymbols) {
37+
$folderName += ".symbols"
38+
}
39+
40+
return $folderName
3341
}
3442
catch {
3543
# If parsing fails, fall through

0 commit comments

Comments
 (0)