Note: This API documentation is for FAKE version 4. The migration API documentation can be found here. The API documentation for the new fake 5 modules can be found here

Choco

Contains tasks which allow to call Chocolatey

Nested types and modules

TypeDescription
ChocoInstallParams

The choco install parameter type.

ChocoPackParams

The choco pack parameter type.

ChocoPushParams

The choco push parameter type.

ChocolateyChecksumType
ChocolateyInstallerType
NuspecData

Functions and values

Function or valueDescription
appendFormattedLine format value builder
Signature: format:StringFormat<('?8407 -> string)> -> value:'?8407 -> builder:StringBuilder -> StringBuilder
Type parameters: '?8407
appendFormattedLineIfNotNull(...)
Signature: format:StringFormat<('?8409 -> string)> -> value:'?8409 -> builder:StringBuilder -> StringBuilder
Type parameters: '?8409
appendLine line builder
Signature: line:string -> builder:StringBuilder -> StringBuilder
callChocoPack nuspecFile parameters
Signature: nuspecFile:string -> parameters:ChocoPackParams -> unit
checksumTypeToString(x)
Signature: x:'?8416 -> string
Type parameters: '?8416
ChocoInstallDefaults
Signature: ChocoInstallParams

The default option set given to choco install.

ChocoPackDefaults
Signature: ChocoPackParams

The default option set given to choco pack.

ChocoPushDefaults
Signature: ChocoPushParams

The default option set given to choco push.

createChocolateyInstallPs1(...)
Signature: parameters:ChocoPackParams -> outputDir:string -> unit
createChocolateyInstallPs1FromTemplate(...)
Signature: parameters:ChocoPackParams -> templatePath:string -> outputDir:string -> unit
createChocolateyUninstallPs1(...)
Signature: parameters:ChocoPackParams -> outputDir:string -> unit
createChocolateyUninstallPs1FromTemplate(...)
Signature: parameters:ChocoPackParams -> templatePath:string -> outputDir:string -> unit
getNuspecData(parameters)
Signature: parameters:ChocoPackParams -> NuspecData
getPaths
Signature: seq<string> list
getTempFolder
Signature: string
Install setParams packages
Signature: setParams:(ChocoInstallParams -> ChocoInstallParams) -> packages:string -> unit

Call choco to install a package

Parameters

  • setParams - Function used to manipulate the default choco parameters. See ChocoInstallParams

  • packages - Names of packages, path to packages.config, .nuspec or .nupkg to install

    Sample usage

    Target "ChocoInstall" (fun _ -> "pretzel" |> Choco.Install (fun p -> { p with Version = "0.4.0" }) )

installerTypeToString(x)
Signature: x:'?8414 -> string
Type parameters: '?8414
IsAvailable
Signature: bool

True if choco is available (only on windows)

Sample usage

1: 
"Build" =?> ("ChocoInstall", Choco.IsAvailable)
Pack(setParams)
Signature: setParams:(ChocoPackParams -> ChocoPackParams) -> unit

Call choco to pack a package and create .nuspec, chocolateyInstall.ps1 and chocolateyUninstall.ps1 if informations are specified

Parameters

  • setParams - Function used to manipulate the default choco parameters. See ChocoPackParams

    Sample usage

    Target "ChocoPack" (fun _ -> Choco.Pack (fun p -> { p with Version = "0.5.0"; ... }) )

PackFromTemplate setParams nuspecPath
Signature: setParams:(ChocoPackParams -> ChocoPackParams) -> nuspecPath:string -> unit

Call choco to pack a package

Parameters

  • setParams - Function used to manipulate the default choco parameters. See ChocoPackParams

  • nuspecPath - path to the .nuspec to pack

    Sample usage

    Target "ChocoPack" (fun _ -> "pretzel.nuspec" |> Choco.Pack (fun p -> { p with Version = "0.5.0" }) )

Push setParams nupkgPath
Signature: setParams:(ChocoPushParams -> ChocoPushParams) -> nupkgPath:string -> unit

Call choco to push a package

Parameters

  • setParams - Function used to manipulate the default choco parameters. See ChocoPushParams

  • nupkgPath - path to the .nupkg to push

    Sample usage

    Target "ChocoPush" (fun _ -> "pretzel.0.5.0.nupkg" |> Choco.Push (fun p -> { p with ApiKey = "123-123123-123" }) )