DownloadToolAliases.

DownloadTool(ICakeContext, DownloadToolSettings) Method

Summary

Installs the tool described by settings, which must set the package, version and URL, unless an identical install is already there, and registers its files with context.Tools.

Syntax

public static IReadOnlyCollection<FilePath> DownloadTool(this ICakeContext context, DownloadToolSettings settings)

Examples

DownloadTool(new DownloadToolSettings()
    .WithPackage("jq")
    .WithVersion("1.8.2")
    .WithUrl("https://github.com/jqlang/jq/releases/download/jq-{version}/jq-{os}-{arch}{exe}")
    .WithOs("darwin", "macos")
    .WithChecksums("sha256sum.txt", "dc86824a41c165ece971ff691aff6e08bbfe6e1d1f531688b47ee78c283a85cd"));

Attributes

Type Description
CakeMethodAliasAttribute

Parameters

Name Type Description
context ICakeContext The Cake context.
settings DownloadToolSettings The settings, including WithPackage, WithVersion and WithUrl.

Return Value

Type Description
IReadOnlyCollection<FilePath> The registered files.