PublishNuget.ps1 556 B

123456789101112131415
  1. $location = Get-Location;
  2. $outputLocation = [System.IO.Path]::Combine($location, "output\nuget");
  3. if( (Test-Path $outputLocation) -eq $false )
  4. {
  5. throw "The output directory ($outputLocation) is not found. Please build the packages before trying to publish."
  6. }
  7. foreach($package in [System.IO.Directory]::GetFiles($outputLocation))
  8. {
  9. $filename = [System.IO.Path]::GetFileName($package);
  10. Write-Host Pushing $filename -ForegroundColor Green
  11. & '.\tools\nuget\NuGet.exe' push $package
  12. Write-Host $filename has been pushed
  13. }