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

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

v5.fake.build

Context Module

This module tracks the context of the build. This allows us to run some modules without any context and change behavior depending on the context (For example Fake.Process kills all processes when the Fake Context exists, but it should not when used as library)

Types

Type Description

FakeExecutionContext

FAKE execution context type

RuntimeContext

FAKE runtime execution context

Functions and values

Function or value Description

forceFakeContext ()

Full Usage: forceFakeContext ()

Parameters:
    () : unit

Returns: FakeExecutionContext

Check and current context is a FAKE execution context and throws `InvalidOperationException` exception when not

() : unit
Returns: FakeExecutionContext

getExecutionContext ()

Full Usage: getExecutionContext ()

Parameters:
    () : unit

Returns: RuntimeContext

Gets FAKE execution context

() : unit
Returns: RuntimeContext

getFakeContext name f

Full Usage: getFakeContext name f

Parameters:
    name : string - FAKE execution context data name
    f : FakeExecutionContext - FAKE execution context

Returns: obj option

Gets FAKE execution context data by name

name : string

FAKE execution context data name

f : FakeExecutionContext

FAKE execution context

Returns: obj option

getFakeExecutionContext e

Full Usage: getFakeExecutionContext e

Parameters:
Returns: FakeExecutionContext option

Gets FAKE execution context by FAKE runtime context

e : RuntimeContext

FAKE runtime execution context

Returns: FakeExecutionContext option

isFakeContext ()

Full Usage: isFakeContext ()

Parameters:
    () : unit

Returns: bool

Check if execution context is a FAKE execution context

() : unit
Returns: bool

removeExecutionContext ()

Full Usage: removeExecutionContext ()

Parameters:
    () : unit

Remove execution context

() : unit

removeFakeContext name f

Full Usage: removeFakeContext name f

Parameters:
    name : string - FAKE execution context data name
    f : FakeExecutionContext - FAKE execution context

Returns: obj option

Removes FAKE execution context data by name

name : string

FAKE execution context data name

f : FakeExecutionContext

FAKE execution context

Returns: obj option

setExecutionContext e

Full Usage: setExecutionContext e

Parameters:

Sets FAKE execution context to the given context

e : RuntimeContext

setExecutionContextFromCommandLineArgs scriptFile

Full Usage: setExecutionContextFromCommandLineArgs scriptFile

Parameters:
    scriptFile : string

Creates and sets the FAKE execution context from command line arguments.

scriptFile : string

setFakeContext name v updateF f

Full Usage: setFakeContext name v updateF f

Parameters:
    name : string - FAKE execution context data name
    v : obj
    updateF : obj -> obj - Callback to call when updating the value
    f : FakeExecutionContext - FAKE execution context

Returns: obj

Set or update FAKE execution context data by name

name : string

FAKE execution context data name

v : obj
updateF : obj -> obj

Callback to call when updating the value

f : FakeExecutionContext

FAKE execution context

Returns: obj