LinuxCommandLibrary

cake

Cross-platform build automation using C#

TLDR

Run default build script

$ dotnet cake
copy
Run specific build script
$ dotnet cake [build.cake]
copy
Run specific target
$ dotnet cake --target=[Clean]
copy
Run with verbosity
$ dotnet cake --verbosity=[diagnostic]
copy
Show available tasks
$ dotnet cake --showdescription
copy
Dry run without executing
$ dotnet cake --dryrun
copy
Run with custom argument
$ dotnet cake --configuration=[Release]
copy

SYNOPSIS

dotnet cake [script] [options]

DESCRIPTION

Cake (C# Make) is a cross-platform build automation system with a C# DSL. It compiles code, copies files, runs tests, compresses files, and builds NuGet packages. Scripts are written in C# and executed via Roslyn.

PARAMETERS

--target=name

Target task to run
--verbosity=level
Output verbosity (quiet, minimal, normal, verbose, diagnostic)
--dryrun
Show tasks without executing
--showdescription
Show task descriptions
--showtree
Show task dependency tree
--configuration=config
Build configuration (Debug, Release)
--exclusive
Execute only target task without dependencies
--version
Show version
--help
Show help

INSTALLATION

$ dotnet new tool-manifest
dotnet tool install Cake.Tool
copy

SCRIPT EXAMPLE

$ Task("Build")
    .Does(() => {
        DotNetBuild("./src/Project.sln");
    });

RunTarget("Build");
copy

CAVEATS

Requires .NET SDK installed. By convention, executes build.cake in current directory. Supports MSBuild, .NET CLI, NuGet, and many other tools through addins.

SEE ALSO

dotnet(1), msbuild(1), make(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community