Skip to content

Commit

Permalink
Updates nuget symbol generation to the new format.
Browse files Browse the repository at this point in the history
  • Loading branch information
bernarden committed Aug 30, 2019
1 parent f5a54db commit 0a8cad3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Scripts/Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ task Test {
task NugetPackage{
Foreach ($projectPath in $ProjectsToPublish)
{
exec { MSBuild "/t:pack" "/p:IncludeSource=true" "/p:Configuration=$VsConfiguration" $projectPath "/p:PackageOutputPath=$PackageDirectory" }
exec { MSBuild "/t:pack" "/p:IncludeSource=true" "/p:SymbolPackageFormat=snupkg" "/p:Configuration=$VsConfiguration" $projectPath "/p:PackageOutputPath=$PackageDirectory" }
}
}

Expand Down
16 changes: 3 additions & 13 deletions Scripts/PublishPackages.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,11 @@ function Get-Approval-To-Execute {
function Publish-Packages {
param ( [System.Array] $Packages)

$nugetExeFile = Get-Item -Path $NugetDir

$symbolsPackagesPattern = ".*.symbols.nupkg"
$nugetPackagesPattern = ".*(?<!\.symbols)\.nupkg"

$symbolsPackages = $Packages | Where-Object {$_.Name -match $symbolsPackagesPattern}
foreach ($symbolsPackage in $symbolsPackages) {
Write-Host "Publishing $($symbolsPackage.Name)" -ForegroundColor Yellow
$args = @("push", $symbolsPackage.FullName, "-source", "https://nuget.smbsrc.net/")
& $nugetExeFile.FullName $args
}

$nugetPackagesPattern = ".*\.nupkg"
$nugetExeFile = Get-Item -Path $NugetDir
$nugetPackages = $Packages | Where-Object {$_.Name -match $nugetPackagesPattern}
foreach ($nugetPackage in $nugetPackages) {
Write-Host "Publishing $($nugetPackage.Name)" -ForegroundColor Yellow
Write-Host "Publishing package: $($nugetPackage.Name)" -ForegroundColor Yellow
$args = @("push", $nugetPackage.FullName, "-source", "https://api.nuget.org/v3/index.json")
& $nugetExeFile.FullName $args
}
Expand Down

0 comments on commit 0a8cad3

Please sign in to comment.