Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Updated documentation of Invoke-Psake after recent changes
Also added Framework as related link to other psake functions
  • Loading branch information
whut committed Aug 5, 2011
1 parent 32912ec commit 5a74222
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 14 deletions.
76 changes: 64 additions & 12 deletions en-US/psake.psm1-help.xml
Expand Up @@ -173,13 +173,16 @@ Possible values: '1.0', '1.1', '2.0', '2.0x86', '2.0x64', '3.0', '3.0x86', '3.0x
<maml:alert>
<maml:para>---- $psake variable ----</maml:para>
<maml:para>When the psake module is loaded a variable called $psake is created which is a hashtable
containing some variables that can be used to configure psake:
containing some variables:

$psake.build_success = $false # indicates that the current build was successful
$psake.version = "4.2" # contains the current version of psake
$psake.build_script_file = $null # contains a System.IO.FileInfo for the current build file
$psake.build_script_dir # contains the fully qualified path to the current build file
$psake.framework_version = "" # contains the framework version # for the current build
$psake.version # contains the current version of psake
$psake.context # holds onto the current state of all variables
$psake.run_by_psake_build_tester # indicates that build is being run by psake-BuildTester
$psake.config_default # contains default configuration
# can be overriden in psake-config.ps1 in directory with psake.psm1 or in directory with current build script
$psake.build_success # indicates that the current build was successful
$psake.build_script_file # contains a System.IO.FileInfo for the current build script
$psake.build_script_dir # contains the fully qualified path to the current build script

You should see the following when you display the contents of the $psake variable right after importing psake

Expand All @@ -188,13 +191,15 @@ PS projects:\psake> $psake

Name Value
---- -----
run_by_psake_build_tester False
version 4.2
build_success False
build_script_file
build_script_dir
build_success False
framework_version
config_default @{framework=3.5; ...
context {}

After a build is executed the following $psake values are updated (build_script_file, build_script_dir, build_success, and framework_version)
After a build is executed the following $psake values are updated: build_script_file, build_script_dir, build_success

PS projects:\psake> Invoke-psake .\examples\default.ps1
Executing task: Clean
Expand All @@ -220,11 +225,14 @@ PS projects:\psake> $psake

Name Value
---- -----
build_script_file YOUR_PATH\examples\default.ps1
run_by_psake_build_tester False
build_script_dir YOUR_PATH\examples
context {}
version 4.2
build_script_file C:\Users\Jorge\Documents\Projects\psake\examples\default.ps1
build_script_dir C:\Users\Jorge\Documents\Projects\psake\examples
build_success True
framework_version 3.5
config_default @{framework=3.5; ...

</maml:para>
<maml:para></maml:para>
</maml:alert>
Expand Down Expand Up @@ -426,6 +434,10 @@ task TestProperties {
<maml:navigationLink>
<maml:linkText>Assert</maml:linkText>
<maml:uri />
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Framework</maml:linkText>
<maml:uri />
</maml:navigationLink>
</maml:relatedLinks>
</command:command>
Expand Down Expand Up @@ -573,6 +585,10 @@ Build Succeeded</maml:para>
<maml:navigationLink>
<maml:linkText>Assert</maml:linkText>
<maml:uri />
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Framework</maml:linkText>
<maml:uri />
</maml:navigationLink>
</maml:relatedLinks>
</command:command>
Expand Down Expand Up @@ -720,6 +736,10 @@ Build Succeeded</maml:para>
<maml:navigationLink>
<maml:linkText>Assert</maml:linkText>
<maml:uri />
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Framework</maml:linkText>
<maml:uri />
</maml:navigationLink>
</maml:relatedLinks>
</command:command>
Expand Down Expand Up @@ -839,6 +859,10 @@ Task Compile -depends Clean {
<maml:navigationLink>
<maml:linkText>FormatTaskName</maml:linkText>
<maml:uri />
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>TaskSetup</maml:linkText>
<maml:uri />
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>TaskTearDown</maml:linkText>
Expand Down Expand Up @@ -1032,6 +1056,10 @@ Task TaskC {
<maml:navigationLink>
<maml:linkText>Assert</maml:linkText>
<maml:uri />
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Framework</maml:linkText>
<maml:uri />
</maml:navigationLink>
</maml:relatedLinks>
</command:command>
Expand Down Expand Up @@ -1169,6 +1197,10 @@ Task Clean {
<maml:navigationLink>
<maml:linkText>Assert</maml:linkText>
<maml:uri />
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Framework</maml:linkText>
<maml:uri />
</maml:navigationLink>
</maml:relatedLinks>
</command:command>
Expand Down Expand Up @@ -1311,6 +1343,10 @@ Task Clean {
<maml:navigationLink>
<maml:linkText>Assert</maml:linkText>
<maml:uri />
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Framework</maml:linkText>
<maml:uri />
</maml:navigationLink>
</maml:relatedLinks>
</command:command>
Expand Down Expand Up @@ -1611,6 +1647,10 @@ Total: 00:00:00.0782496</dev:code>
<maml:navigationLink>
<maml:linkText>Assert</maml:linkText>
<maml:uri />
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Framework</maml:linkText>
<maml:uri />
</maml:navigationLink>
</maml:relatedLinks>
</command:command>
Expand Down Expand Up @@ -1784,6 +1824,10 @@ The solution is to wrap the condition in () so that PS will evaluate it first.
<maml:uri />
</maml:navigationLink>
</maml:relatedLinks>
<maml:navigationLink>
<maml:linkText>Framework</maml:linkText>
<maml:uri />
</maml:navigationLink>
</command:command>

<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10">
Expand Down Expand Up @@ -1927,6 +1971,10 @@ The solution is to wrap the condition in () so that PS will evaluate it first.
<maml:uri />
</maml:navigationLink>
</maml:relatedLinks>
<maml:navigationLink>
<maml:linkText>Framework</maml:linkText>
<maml:uri />
</maml:navigationLink>
</command:command>

<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10">
Expand Down Expand Up @@ -2057,6 +2105,10 @@ The solution is to wrap the condition in () so that PS will evaluate it first.
<maml:linkText>TaskTearDown</maml:linkText>
<maml:uri />
</maml:navigationLink>
<maml:navigationLink>
<maml:linkText>Framework</maml:linkText>
<maml:uri />
</maml:navigationLink>
</maml:relatedLinks>
</command:command>
</helpItems>
4 changes: 2 additions & 2 deletions psake.psm1
Expand Up @@ -720,10 +720,10 @@ $psake.config_default = new-object psobject -property @{
modules = (new-object PSObject -property @{
autoload = $false
})
} # contains default configuration, can be overriden in psake-config.ps1 in directory with psake.psm1
} # contains default configuration, can be overriden in psake-config.ps1 in directory with psake.psm1 or in directory with current build script

$psake.build_success = $false # indicates that the current build was successful
$psake.build_script_file = $null # contains a System.IO.FileInfo for the current build file
$psake.build_script_file = $null # contains a System.IO.FileInfo for the current build script
$psake.build_script_dir = "" # contains a string with fully-qualified path to current build script

Load-Configuration
Expand Down

0 comments on commit 5a74222

Please sign in to comment.