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

CommandHelper Module

Contains helpers which allow to interact with [git](http://git-scm.com/) via the command line.

Functions and values

Function or value Description

CommandHelper.directRunGitCommand repositoryDir command

Full Usage: CommandHelper.directRunGitCommand repositoryDir command

Parameters:
    repositoryDir : string - The repository directory to execute command in
    command : string - The GIT command to execute

Returns: bool

Runs the given git command, waits for its completion and returns whether it succeeded.

repositoryDir : string

The repository directory to execute command in

command : string

The GIT command to execute

Returns: bool

CommandHelper.directRunGitCommandAndFail repositoryDir command

Full Usage: CommandHelper.directRunGitCommandAndFail repositoryDir command

Parameters:
    repositoryDir : string - The repository directory to execute command in
    command : string - The GIT command to execute

Runs the given git command, waits for its completion and fails when it didn't succeeded.

repositoryDir : string

The repository directory to execute command in

command : string

The GIT command to execute

CommandHelper.findGitDir repositoryDir

Full Usage: CommandHelper.findGitDir repositoryDir

Parameters:
    repositoryDir : string

Returns: DirectoryInfo

Searches for a .git directory in the specified directory or any parent directory.

repositoryDir : string
Returns: DirectoryInfo

CommandHelper.fireAndForgetGitCommand repositoryDir command

Full Usage: CommandHelper.fireAndForgetGitCommand repositoryDir command

Parameters:
    repositoryDir : string - The repository directory to execute command in
    command : string - The GIT command to execute

Fires the given git command in the given repository directory and returns immediately.

repositoryDir : string

The repository directory to execute command in

command : string

The GIT command to execute

CommandHelper.fixPath path

Full Usage: CommandHelper.fixPath path

Parameters:
    path : string

Returns: string

Fixes the given path by escaping backslashes

path : string
Returns: string

CommandHelper.getGitResult repositoryDir command

Full Usage: CommandHelper.getGitResult repositoryDir command

Parameters:
    repositoryDir : string - The repository directory to execute command in
    command : string - The GIT command to execute

Returns: string list

Runs git.exe with the given command in the given repository directory and return results

repositoryDir : string

The repository directory to execute command in

command : string

The GIT command to execute

Returns: string list

CommandHelper.gitCommand repositoryDir command

Full Usage: CommandHelper.gitCommand repositoryDir command

Parameters:
    repositoryDir : string
    command : string

Runs the given git command, waits for its completion. The repository directory to execute command in The GIT command to execute

repositoryDir : string
command : string

CommandHelper.gitCommandf repositoryDir fmt

Full Usage: CommandHelper.gitCommandf repositoryDir fmt

Parameters:
    repositoryDir : string
    fmt : StringFormat<'a, unit>

Returns: 'a

Runs git.exe with the given formatted command The repository directory to execute command in The GIT command to execute

repositoryDir : string
fmt : StringFormat<'a, unit>
Returns: 'a

CommandHelper.gitPath

Full Usage: CommandHelper.gitPath

Returns: string

Tries to locate the git.exe via the environment variable "GIT".

Returns: string

CommandHelper.gitTimeOut

Full Usage: CommandHelper.gitTimeOut

Returns: TimeSpan

Specifies a global timeout for git.exe - default is no timeout

Returns: TimeSpan

CommandHelper.runGitCommand repositoryDir command

Full Usage: CommandHelper.runGitCommand repositoryDir command

Parameters:
    repositoryDir : string - The repository directory to execute command in
    command : string - The GIT command to execute

Returns: bool * string list * string

Runs git.exe with the given command in the given repository directory.

repositoryDir : string

The repository directory to execute command in

command : string

The GIT command to execute

Returns: bool * string list * string

CommandHelper.runGitCommandf fmt

Full Usage: CommandHelper.runGitCommandf fmt

Parameters:
    fmt : StringFormat<'a, (string -> bool * string list * string)> - The formatted GIT command string to execute

Returns: 'a

Runs git.exe with the given formatted command

fmt : StringFormat<'a, (string -> bool * string list * string)>

The formatted GIT command string to execute

Returns: 'a

CommandHelper.runSimpleGitCommand repositoryDir command

Full Usage: CommandHelper.runSimpleGitCommand repositoryDir command

Parameters:
    repositoryDir : string
    command : string

Returns: string

Runs the git command and returns the first line of the result. The repository directory to execute command in The GIT command to execute

repositoryDir : string
command : string
Returns: string

CommandHelper.showGitCommand repositoryDir command

Full Usage: CommandHelper.showGitCommand repositoryDir command

Parameters:
    repositoryDir : string
    command : string

Runs the given git command, waits for its completion. This version doesn't throw an exception if an error occurs. It just traces the error. The repository directory to execute command in The GIT command to execute

repositoryDir : string
command : string