add script to push nupkgs

This commit is contained in:
Kirk Shoop (MS OPEN TECH)
2014-08-29 10:45:54 -07:00
parent 6f4ce3f83e
commit 67b5c07ee0
2 changed files with 27 additions and 1 deletions
+2 -1
View File
@@ -21,4 +21,5 @@ Copy-Item *.nupkg ..\packages\NuGet
Set-Location $CurDir
Write-Host "The .nuspec files are in the 'packages' directory" -foregroundcolor black -backgroundcolor green
Write-Host "The .nupkg files are in the 'packages' directory." -foregroundcolor black -backgroundcolor green
Write-Host "Run PushPackages to push them." -foregroundcolor red -backgroundcolor yellow
+25
View File
@@ -0,0 +1,25 @@
param (
[string] $Version = $(throw 'Redis version to push is required')
)
Write-Host "Ensure that the api keys have been set for chocolatey and nuget" -foregroundcolor red -backgroundcolor yellow
Write-Host " NuGet SetApiKey <your key here> -source http://chocolatey.org/" -foregroundcolor red -backgroundcolor yellow
Write-Host " NuGet SetApiKey <your key here>" -foregroundcolor red -backgroundcolor yellow
$CurDir = split-path -parent $MyInvocation.MyCommand.Definition
$PackagesDir = $CurDir + "\packages"
$ChocolateyDir = $PackagesDir + "\Chocolatey"
$NugetDir = $PackagesDir + "\Nuget"
Set-Location $ChocolateyDir
$ChocolateyCommand = "chocolatey push Redis-64." + $Version + ".nupkg"
invoke-expression $ChocolateyCommand
Set-Location $NugetDir
$NugetCommand = "NuGet push Redis-64." + $Version + ".nupkg"
invoke-expression $NugetCommand
Set-Location $CurDir
Write-Host "The .nupkg files have been pushed!" -foregroundcolor black -backgroundcolor green