FAKE - F# Make - A DSL for build tasks and more FAKE
6.0.0

Lookig for older versions of the documentation, pre FAKE v6? See 

v5.fake.build

Target Module

FAKE Target module contains tasks to define and run targets.

Types and nested modules

Type/Module Description

WithContext

Run functions which don't throw and return the context after all targets have been executed.

OptionalTargetContext

Optional TargetContext

Functions and values

Function or value Description

Target.activateBuildFailure name

Full Usage: Target.activateBuildFailure name

Parameters:
    name : string - The target name

Activates the build failure target.

name : string

The target name

Target.activateFinal name

Full Usage: Target.activateFinal name

Parameters:
    name : string - The target name

Activates the final target.

name : string

The target name

Target.create name body

Full Usage: Target.create name body

Parameters:

Creates a Target.

name : string
body : TargetParameter -> unit

Target.createBuildFailure name body

Full Usage: Target.createBuildFailure name body

Parameters:
    name : string - The target name
    body : TargetParameter -> unit - The target body

Creates a target in case of build failure (not activated).

name : string

The target name

body : TargetParameter -> unit

The target body

Target.createFinal name body

Full Usage: Target.createFinal name body

Parameters:
    name : string - The target name
    body : TargetParameter -> unit - The target body

Creates a final target (not activated).

name : string

The target name

body : TargetParameter -> unit

The target body

Target.deactivateBuildFailure name

Full Usage: Target.deactivateBuildFailure name

Parameters:
    name : string - The target name

Deactivates the build failure target.

name : string

The target name

Target.deactivateFinal name

Full Usage: Target.deactivateFinal name

Parameters:
    name : string - The target name

Deactivates the final target.

name : string

The target name

Target.description text

Full Usage: Target.description text

Parameters:
    text : string - The description of the next target

Sets the Description for the next target.

text : string

The description of the next target

Target.get name

Full Usage: Target.get name

Parameters:
    name : string

Returns: Target
name : string
Returns: Target

Target.getArguments ()

Full Usage: Target.getArguments ()

Parameters:
    () : unit

Returns: string[] option

Allows to retrieve the arguments passed into the current execution, when Target.run*withArguments overloads are used, see Targets with arguments

This function should be used at the start of your fake script Alternatively, you can use Target.initEnvironment() instead, Note: This function usually returns Some [||], it will return None when No actual execution was requested (for example because of --list), you shouldn't execute any side effects when None is returned (you should never execute side effects but you can use this flag to check if needed)

() : unit
Returns: string[] option

Target.initEnvironment ()

Full Usage: Target.initEnvironment ()

Parameters:
    () : unit

Allows to initialize the environment before defining targets

This function should be used at the start of your fake script see issues #2283 Alternatively, you can use Target.getArguments() instead

() : unit

Target.listAvailable ()

Full Usage: Target.listAvailable ()

Parameters:
    () : unit

List all targets available.

() : unit

Target.printDependencyGraph verbose target

Full Usage: Target.printDependencyGraph verbose target

Parameters:
    verbose : bool - Whether to print verbose output or not.
    target : string - The target for which the dependencies should be printed.

Writes a dependency graph.

verbose : bool

Whether to print verbose output or not.

target : string

The target for which the dependencies should be printed.

Target.raiseIfError context

Full Usage: Target.raiseIfError context

Parameters:

If `TargetContext option` is Some and has error, raise it as a BuildFailedException

context : OptionalTargetContext

The target context

Target.removeCollectStack

Full Usage: Target.removeCollectStack

Returns: unit -> unit
Returns: unit -> unit

Target.removeLastDescription

Full Usage: Target.removeLastDescription

Returns: unit -> unit
Returns: unit -> unit

Target.run parallelJobs targetName args

Full Usage: Target.run parallelJobs targetName args

Parameters:
    parallelJobs : int
    targetName : string - The target name
    args : string list - The arguments list

Runs a target and its dependencies

parallelJobs : int
targetName : string

The target name

args : string list

The arguments list

Target.runOrDefault defaultTarget

Full Usage: Target.runOrDefault defaultTarget

Parameters:
    defaultTarget : string

Runs the command given on the command line or the given target when no target is given

defaultTarget : string

Target.runOrDefaultWithArguments defaultTarget

Full Usage: Target.runOrDefaultWithArguments defaultTarget

Parameters:
    defaultTarget : string

Runs the command given on the command line or the given target when no target is given

defaultTarget : string

Target.runOrList ()

Full Usage: Target.runOrList ()

Parameters:
    () : unit

Runs the target given by the target parameter or lists the available targets

() : unit

Target.runSimple name args

Full Usage: Target.runSimple name args

Parameters:
    name : string - The final target name
    args : string list - The target arguments

Returns: TargetResult

This simply runs the function of a target without doing anything (like tracing, stop watching or adding it to the results at the end)

name : string

The final target name

args : string list

The target arguments

Returns: TargetResult

Target.runSimpleWithContext name ctx

Full Usage: Target.runSimpleWithContext name ctx

Parameters:
    name : string - The target name
    ctx : TargetContext - The context object

Returns: TargetResult

This simply runs the function of a target without doing anything (like tracing, stop watching or adding it to the results at the end)

name : string

The target name

ctx : TargetContext

The context object

Returns: TargetResult

Target.setCollectStack

Full Usage: Target.setCollectStack

Returns: bool -> unit
Returns: bool -> unit

Target.setLastDescription

Full Usage: Target.setLastDescription

Returns: string -> unit
Returns: string -> unit

Target.setPrintStackTraceOnError

Full Usage: Target.setPrintStackTraceOnError

Returns: bool -> unit
Returns: bool -> unit

Target.updateBuildStatus context

Full Usage: Target.updateBuildStatus context

Parameters:

Updates build status based on OptionalTargetContext Will not update status if OptionalTargetContext is MaybeSet with value None

context : OptionalTargetContext

The target context