Skip to content

Instantly share code, notes, and snippets.

@akamyshanov
Last active August 23, 2017 08:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save akamyshanov/318d0c59aaa400e0ee7f8af255a18731 to your computer and use it in GitHub Desktop.
Save akamyshanov/318d0c59aaa400e0ee7f8af255a18731 to your computer and use it in GitHub Desktop.
Commands NuGet to pack all .nuspec files in directory
param (
[string]$Version = "0.0.0-dev",
[string]$OutputDirectory = "bin"
)
Get-ChildItem $OutputDirectory -Include "*.nupkg" -Depth 1 | Remove-Item
$nuspecs = Get-ChildItem "*.nuspec" -File -Recurse
foreach($nuspec in $nuspecs) {
nuget pack $nuspec.FullName -OutputDirectory "bin" -Version $version
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment