-
Notifications
You must be signed in to change notification settings - Fork 64
nugets_pack
This task type will automatically construct nuget packages for each of the projects you've given it as an Enumerable (the assignment to #files
).
The project's <Name />
element will map to the id
and title
nuspec attributes, unless an Id
element has been given, in which case it will map to the id
nuspec attribute, and <Title />
to the title
nuspec attribute.
nugets_pack :create_nugets do |p|
p.configuration = 'Release'
p.files = FileList['src/**/*.{csproj,fsproj,nuspec}'].
exclude(/Tests/)
p.output = 'build/pkg'
p.exe = '.paket/paket.exe'
m = p.metadata
m.description = 'A cool nuget'
m.authors = 'Henrik'
m.version = ENV['NUGET_VERSION']
m.add_dependency "NugetId", "[1.0.0)"
end
The available metadata properties are in the nuspec specification. Translate the camel case property to snake case. You can also browse the albacore code to a list.
Cancel following of references between projects that cause nugets_pack to find and add as nuget dependencies, linked projects.
nugets_pack :create_nugets do |p|
...
p.gen_symbols
...
end
Instead of having nuget in your source you can depend on the nuget gem So in the above example you can replace "p.exe" with "p.nuget_gem_exe":
nugets_pack :create_nugets do |p|
...
p.nuget_gem_exe
...
end
And in your gemfile add the line:
gem 'nuget'
in addition to albacore.
p.mono_opt_out