add script to push nupkgs
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user