Skip to content

Instantly share code, notes, and snippets.

@chrisortman
Created April 2, 2011 05:56
Show Gist options
  • Save chrisortman/899274 to your computer and use it in GitHub Desktop.
Save chrisortman/899274 to your computer and use it in GitHub Desktop.
param($packageName)
write-host "Testing $packageName"
$chocPath = "c:\nuget"
$binFile = "c:\nuget\bin\$packageName.bat"
if(test-path $binFile) {
Write-host "Removing $binFile"
Remove-Item $binFile
}
[xml] $nuspec = (get-content "$packageName\$packageName.nuspec")
$version = $nuspec.package.metadata.version
$libPath = "c:\nuget\lib\$packageName.$version"
if(test-path $libPath) {
Remove-Item -Recurse -Path
}
Write-Host "Creating new package file"
$localNugetRepository = "e:\mynugetpackages"
.\chocolatey\tools\chocolateyInstall\NuGet.exe pack .\$packageName\$packageName.nuspec /outputdirectory $localNugetRepository
chocolatey test_install $packageName $localNugetRepository
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment