Skip to content

Instantly share code, notes, and snippets.

@dubmun
Forked from joshuaflanagan/package.bat
Last active December 18, 2015 13:29
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save dubmun/5790355 to your computer and use it in GitHub Desktop.
Save dubmun/5790355 to your computer and use it in GitHub Desktop.
@ECHO OFF
SETLOCAL
SET VERSION=%1
SET NUGET=buildsupport\nuget.exe
FOR %%G IN (packaging\nuget\*.nuspec) DO (
%NUGET% pack %%G -Version %VERSION% -Symbols -o artifacts
)
##Powershell Script to build all packages in a folder
$NuGet = ".\buildsupport\NuGet.exe"
$NuSpecs = ".\packaging\nuget\*.nuspec"
$Version = $args[0]
foreach ($nuspec in get-childitem $NuSpecs){
& $NuGet pack $nuspec -Version $Version -Symbols -o artifacts
}
# A rake task to build all packages in a folder
desc "Build the nuget packages"
task :package do
rm Dir.glob("#{ARTIFACTS}/*.nupkg")
FileList["packaging/nuget/*.nuspec"].each do |spec|
sh "#{nuget} pack #{spec} -o #{ARTIFACTS} -Version #{BUILD_NUMBER} -Symbols"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment