ChocolateyAliases.

ChocolateyPack(ICakeContext, IEnumerable<FilePath>, ChocolateyPackSettings) Method

Summary

Creates Chocolatey packages using the specified Nuspec files.

Syntax

[CakeMethodAlias]
[CakeAliasCategory("Pack")]
[CakeNamespaceImport("Cake.Common.Tools.Chocolatey.Pack")]
public static void ChocolateyPack(this ICakeContext context, IEnumerable<FilePath> filePaths, ChocolateyPackSettings settings)

Examples

     var chocolateyPackSettings   = new ChocolateyPackSettings {
                                     Id                      = "TestChocolatey",
                                     Title                   = "The tile of the package",
                                     Version                 = "0.0.0.1",
                                     Authors                 = new[] {"John Doe"},
                                     Owners                  = new[] {"Contoso"},
                                     Summary                 = "Excellent summary of what the package does",
                                     Description             = "The description of the package",
                                     ProjectUrl              = new Uri("https://github.com/SomeUser/TestChocolatey/"),
                                     PackageSourceUrl        = new Uri("https://github.com/SomeUser/TestChocolatey/"),
                                     ProjectSourceUrl        = new Uri("https://github.com/SomeUser/TestChocolatey/"),
                                     DocsUrl                 = new Uri("https://github.com/SomeUser/TestChocolatey/"),
                                     MailingListUrl          = new Uri("https://github.com/SomeUser/TestChocolatey/"),
                                     BugTrackerUrl           = new Uri("https://github.com/SomeUser/TestChocolatey/"),
                                     Tags                    = new [] {"Cake", "Script", "Build"},
                                     Copyright               = "Some company 2015",
                                     LicenseUrl              = new Uri("https://github.com/SomeUser/TestChocolatey/blob/master/LICENSE.md"),
                                     RequireLicenseAcceptance= false,
                                     IconUrl                 = new Uri("http://cdn.rawgit.com/SomeUser/TestChocolatey/master/icons/testchocolatey.png"),
                                     ReleaseNotes            = new [] {"Bug fixes", "Issue fixes", "Typos"},
                                     Files                   = new [] {
                                                                          new ChocolateyNuSpecContent {Source = "bin/TestChocolatey.dll", Target = "bin"},
                                                                       },
                                     Debug                   = false,
                                     Verbose                 = false,
                                     Force                   = false,
                                     Noop                    = false,
                                     LimitOutput             = false,
                                     ExecutionTimeout        = 13,
                                     CacheLocation           = @"C:\temp",
                                     AllowUnofficial          = false
                                 };

     var nuspecFiles = GetFiles("./**/*.nuspec");
     ChocolateyPack(nuspecFiles, chocolateyPackSettings);

Attributes

Type Description
CakeMethodAliasAttribute An attribute used to mark script method aliases.
CakeAliasCategoryAttribute An attribute used for documentation of alias methods/properties.
CakeNamespaceImportAttribute An attribute used to hint Cake about additional namespaces that need to be imported for an alias to work. This attribute can mark an extension method, the extension method class, or the assembly to provide a global set of imports.

Parameters

Name Type Description
context ICakeContext The context.
filePaths IEnumerable<FilePath> The nuspec file paths.
settings ChocolateyPackSettings The settings.

Return Value

Type Description
void