Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Completed the psake nutget push

  • Loading branch information...
commit b51d3f28c10b12127c0355045f9ecdf45ef3537d 1 parent adcf83d
@lanwin authored
View
BIN  Packages/NuGet/NuGet.exe
Binary file not shown
View
1,935 Packages/PSake/en-US/psake.psm1-help.xml
@@ -0,0 +1,1935 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<helpItems schema="maml">
+ <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">
+ <command:details>
+ <command:name>Invoke-psake</command:name>
+ <maml:description>
+ <maml:para>Runs a psake build script.</maml:para>
+ </maml:description>
+ <maml:copyright>
+ <maml:para />
+ </maml:copyright>
+ <command:verb>Invoke</command:verb>
+ <command:noun>psake</command:noun>
+ <dev:version />
+ </command:details>
+ <maml:description>
+ <maml:para>This function runs a psake build script</maml:para>
+ </maml:description>
+ <command:syntax>
+ <command:syntaxItem>
+ <command:name>Invoke-psake</command:name>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>buildFile</maml:name>
+ <command:parameterValue required="false" variableLength="false">String</command:parameterValue>
+ </command:parameter>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>taskList</maml:name>
+ <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue>
+ </command:parameter>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>framework</maml:name>
+ <command:parameterValue required="false" variableLength="false">String</command:parameterValue>
+ </command:parameter>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>docs</maml:name>
+ <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
+ </command:parameter>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>parameters</maml:name>
+ <command:parameterValue required="false" variableLength="false">Hashtable</command:parameterValue>
+ </command:parameter>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>properties</maml:name>
+ <command:parameterValue required="false" variableLength="false">Hashtable</command:parameterValue>
+ </command:parameter>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>nologo</maml:name>
+ <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
+ </command:parameter>
+ </command:syntaxItem>
+ </command:syntax>
+ <command:parameters>
+ <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>buildFile</maml:name>
+ <maml:description>
+ <maml:para>The path to the psake build script to execute</maml:para>
+ </maml:description>
+ <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
+ <dev:type>
+ <maml:name>String</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue>'default.ps1'</dev:defaultValue>
+ </command:parameter>
+ <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="1">
+ <maml:name>taskList</maml:name>
+ <maml:description>
+ <maml:para>A comma-separated list of task names to execute</maml:para>
+ </maml:description>
+ <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue>
+ <dev:type>
+ <maml:name>String[]</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue />
+ </command:parameter>
+ <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="2">
+ <maml:name>framework</maml:name>
+ <maml:description>
+ <maml:para>The version of the .NET framework you want to build. You can append x86 or x64 to force a specific framework. If not specified, x86 or x64 will be detected based on the bitness of the PowerShell process.
+Possible values: '1.0', '1.1', '2.0', '2.0x86', '2.0x64', '3.0', '3.0x86', '3.0x64', '3.5', '3.5x86', '3.5x64', '4.0', '4.0x86', '4.0x6'</maml:para>
+ </maml:description>
+ <command:parameterValue required="false" variableLength="false">String</command:parameterValue>
+ <dev:type>
+ <maml:name>String</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue>'3.5'</dev:defaultValue>
+ </command:parameter>
+ <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="3">
+ <maml:name>docs</maml:name>
+ <maml:description>
+ <maml:para>Prints a list of tasks and their descriptions</maml:para>
+ </maml:description>
+ <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
+ <dev:type>
+ <maml:name>SwitchParameter</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue />
+ </command:parameter>
+ <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="4">
+ <maml:name>parameters</maml:name>
+ <maml:description>
+ <maml:para>A hashtable containing parameters to be passed into the current build script. These parameters will be processed before the 'Properties' function of the script is processed. This means you can access parameters from within the 'Properties' function!
+</maml:para>
+ </maml:description>
+ <command:parameterValue required="false" variableLength="false">Hashtable</command:parameterValue>
+ <dev:type>
+ <maml:name>Hashtable</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue />
+ </command:parameter>
+ <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="5">
+ <maml:name>properties</maml:name>
+ <maml:description>
+ <maml:para>A hashtable containing properties to be passed into the current build script. These properties will override matching properties that are found in the 'Properties' function of the script.</maml:para>
+ </maml:description>
+ <command:parameterValue required="false" variableLength="false">Hashtable</command:parameterValue>
+ <dev:type>
+ <maml:name>Hashtable</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue />
+ </command:parameter>
+ <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="6">
+ <maml:name>nologo</maml:name>
+ <maml:description>
+ <maml:para>Do not display the startup banner and copyright message.</maml:para>
+ </maml:description>
+ <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
+ <dev:type>
+ <maml:name>SwitchParameter</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue />
+ </command:parameter>
+ </command:parameters>
+ <command:inputTypes>
+ <command:inputType>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para />
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:inputType>
+ </command:inputTypes>
+ <command:returnValues>
+ <command:returnValue>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para></maml:para>
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:returnValue>
+ </command:returnValues>
+ <command:terminatingErrors />
+ <command:nonTerminatingErrors />
+ <maml:alertSet>
+ <maml:title></maml:title>
+ <maml:alert>
+ <maml:para>---- Exceptions ----</maml:para>
+ <maml:para>If there is an exception thrown during the running of a build script and the build script was invoked by a windows service then psake will execute the "exit" command (with a default value of "1") which in turn sets the PowerShell $lastexitcode variable otherwise psake will set the '$psake.build_success' variable to $true or $false depending on whether an exception was thrown.</maml:para>
+ <maml:para></maml:para>
+ </maml:alert>
+ <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:
+
+$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
+
+You should see the following when you display the contents of the $psake variable right after importing psake
+
+PS projects:\psake> Import-Module .\psake.psm1
+PS projects:\psake> $psake
+
+Name Value
+---- -----
+version 4.2
+build_script_file
+build_script_dir
+build_success False
+framework_version
+
+After a build is executed the following $psake values are updated (build_script_file, build_script_dir, build_success, and framework_version)
+
+PS projects:\psake> Invoke-psake .\examples\default.ps1
+Executing task: Clean
+Executed Clean!
+Executing task: Compile
+Executed Compile!
+Executing task: Test
+Executed Test!
+
+Build Succeeded!
+
+----------------------------------------------------------------------
+Build Time Report
+----------------------------------------------------------------------
+Name Duration
+---- --------
+Clean 00:00:00.0798486
+Compile 00:00:00.0869948
+Test 00:00:00.0958225
+Total: 00:00:00.2712414
+
+PS projects:\psake> $psake
+
+Name Value
+---- -----
+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
+</maml:para>
+ <maml:para></maml:para>
+ </maml:alert>
+ </maml:alertSet>
+ <command:examples>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 1 --------------</maml:title>
+ <maml:introduction>
+ <maml:para>C:\PS&gt;</maml:para>
+ </maml:introduction>
+ <dev:code>Invoke-psake</dev:code>
+ <dev:remarks>
+ <maml:para>Description</maml:para>
+ <maml:para>-----------</maml:para>
+ <maml:para>Runs the 'default' task in the '.build.ps1' build script</maml:para>
+ <maml:para />
+ <maml:para />
+ <maml:para />
+ </dev:remarks>
+ <command:commandLines>
+ <command:commandLine>
+ <command:commandText />
+ </command:commandLine>
+ </command:commandLines>
+ </command:example>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 2 --------------</maml:title>
+ <maml:introduction>
+ <maml:para>C:\PS&gt;</maml:para>
+ </maml:introduction>
+ <dev:code>Invoke-psake '.\build.ps1' Tests,Package</dev:code>
+ <dev:remarks>
+ <maml:para>Description</maml:para>
+ <maml:para>-----------</maml:para>
+ <maml:para>Runs the 'Tests' and 'Package' tasks in the '.build.ps1' build script</maml:para>
+ <maml:para />
+ <maml:para />
+ <maml:para />
+ </dev:remarks>
+ <command:commandLines>
+ <command:commandLine>
+ <command:commandText />
+ </command:commandLine>
+ </command:commandLines>
+ </command:example>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 3 --------------</maml:title>
+ <maml:introduction>
+ <maml:para>C:\PS&gt;</maml:para>
+ </maml:introduction>
+ <dev:code>Invoke-psake Tests</dev:code>
+ <dev:remarks>
+ <maml:para>Description</maml:para>
+ <maml:para>-----------</maml:para>
+ <maml:para>This example will run the 'Tests' tasks in the 'default.ps1' build script. The 'default.ps1' is assumed to be in the current directory.</maml:para>
+ <maml:para />
+ <maml:para />
+ <maml:para />
+ </dev:remarks>
+ <command:commandLines>
+ <command:commandLine>
+ <command:commandText />
+ </command:commandLine>
+ </command:commandLines>
+ </command:example>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 4 --------------</maml:title>
+ <maml:introduction>
+ <maml:para>C:\PS&gt;</maml:para>
+ </maml:introduction>
+ <dev:code>Invoke-psake 'Tests, Package'</dev:code>
+ <dev:remarks>
+ <maml:para>Description</maml:para>
+ <maml:para>-----------</maml:para>
+ <maml:para>This example will run the 'Tests' and 'Package' tasks in the 'default.ps1' build script. The 'default.ps1' is assumed to be in the current directory.</maml:para>
+ <maml:para>NOTE: The quotes around the list of tasks to execute is required if you want to execute more than 1 task.</maml:para>
+ <maml:para />
+ <maml:para />
+ </dev:remarks>
+ <command:commandLines>
+ <command:commandLine>
+ <command:commandText />
+ </command:commandLine>
+ </command:commandLines>
+ </command:example>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 5 --------------</maml:title>
+ <maml:introduction>
+ <maml:para>C:\PS&gt;</maml:para>
+ </maml:introduction>
+ <dev:code>Invoke-psake .\build.ps1 -docs</dev:code>
+ <dev:remarks>
+ <maml:para>Description</maml:para>
+ <maml:para>-----------</maml:para>
+ <maml:para>Prints a report of all the tasks and their dependencies and descriptions and then exits</maml:para>
+ <maml:para />
+ <maml:para />
+ <maml:para />
+ </dev:remarks>
+ <command:commandLines>
+ <command:commandLine>
+ <command:commandText />
+ </command:commandLine>
+ </command:commandLines>
+ </command:example>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 6 --------------</maml:title>
+ <maml:introduction>
+ <maml:para>C:\PS&gt;</maml:para>
+ </maml:introduction>
+ <dev:code>Invoke-psake .\parameters.ps1 -parameters @{"p1"="v1";"p2"="v2"}</dev:code>
+ <dev:remarks>
+ <maml:para>Description</maml:para>
+ <maml:para>-----------</maml:para>
+ <maml:para>Runs the build script called 'parameters.ps1' and passes in parameters 'p1' and 'p2' with values 'v1' and 'v2'</maml:para>
+ <maml:para>Here's the .\parameters.ps1 build script:</maml:para>
+ <maml:para />
+ <maml:para>
+ properties {
+ $my_property = $p1 + $p2
+}
+
+task default -depends TestParams
+
+task TestParams {
+ Assert ($my_property -ne $null) '$my_property should not be null'
+}</maml:para>
+ <maml:para />
+ <maml:para>Notice how you can refer to the parameters that were passed into the script from within the “properties” function. The value of the $p1 variable should be the string “v1” and the value of the $p2 variable should be “v2”.</maml:para>
+ <maml:para />
+ </dev:remarks>
+ <command:commandLines>
+ <command:commandLine>
+ <command:commandText />
+ </command:commandLine>
+ </command:commandLines>
+ </command:example>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 7 --------------</maml:title>
+ <maml:introduction>
+ <maml:para>C:\PS&gt;</maml:para>
+ </maml:introduction>
+ <dev:code>Invoke-psake .\properties.ps1 -properties @{"x"="1";"y"="2"}</dev:code>
+ <dev:remarks>
+ <maml:para>Description</maml:para>
+ <maml:para>-----------</maml:para>
+ <maml:para>Runs the build script called 'properties.ps1' and passes in parameters 'x' and 'y' with values '1' and '2'</maml:para>
+ <maml:para>This feature allows you to over-ride existing properties in your build script.</maml:para>
+ <maml:para />
+ <maml:para>Here's the .\properties.ps1 build script</maml:para>
+ <maml:para>properties {
+ $x = $null
+ $y = $null
+ $z = $null
+}
+
+task default -depends TestProperties
+
+task TestProperties {
+ Assert ($x -ne $null) "x should not be null"
+ Assert ($y -ne $null) "y should not be null"
+ Assert ($z -eq $null) "z should be null"
+}
+</maml:para>
+ <maml:para />
+ </dev:remarks>
+ <command:commandLines>
+ <command:commandLine>
+ <command:commandText />
+ </command:commandLine>
+ </command:commandLines>
+ </command:example>
+ </command:examples>
+ <maml:relatedLinks>
+ <maml:navigationLink>
+ <maml:linkText>Task</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Include</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Properties</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <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>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Assert</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ </maml:relatedLinks>
+ </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">
+ <command:details>
+ <command:name>TaskTearDown</command:name>
+ <maml:description>
+ <maml:para>Adds a scriptblock to the build that will be executed after each task</maml:para>
+ </maml:description>
+ <maml:copyright>
+ <maml:para />
+ </maml:copyright>
+ <command:verb></command:verb>
+ <command:noun></command:noun>
+ <dev:version />
+ </command:details>
+ <maml:description>
+ <maml:para>This function will accept a scriptblock that will be executed after each
+task in the build script.</maml:para>
+ </maml:description>
+ <command:syntax>
+ <command:syntaxItem>
+ <command:name>TaskTearDown</command:name>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>teardown</maml:name>
+ <command:parameterValue required="true" variableLength="false">ScriptBlock</command:parameterValue>
+ </command:parameter>
+ </command:syntaxItem>
+ </command:syntax>
+ <command:parameters>
+ <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>teardown</maml:name>
+ <maml:description>
+ <maml:para>A scriptblock to execute</maml:para>
+ </maml:description>
+ <command:parameterValue required="true" variableLength="false">ScriptBlock</command:parameterValue>
+ <dev:type>
+ <maml:name>ScriptBlock</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ </command:parameters>
+ <command:inputTypes>
+ <command:inputType>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para />
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:inputType>
+ </command:inputTypes>
+ <command:returnValues>
+ <command:returnValue>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para></maml:para>
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:returnValue>
+ </command:returnValues>
+ <command:terminatingErrors />
+ <command:nonTerminatingErrors />
+ <maml:alertSet>
+ <maml:title></maml:title>
+ <maml:alert>
+ <maml:para></maml:para>
+ </maml:alert>
+ </maml:alertSet>
+ <command:examples>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 1 --------------</maml:title>
+ <maml:introduction>
+ <maml:para>C:\PS&gt;</maml:para>
+ </maml:introduction>
+ <dev:code>A sample build script is shown below:
+
+Task default -depends Test
+
+Task Test -depends Compile, Clean {
+}
+
+Task Compile -depends Clean {
+}
+
+Task Clean {
+}
+
+TaskTearDown {
+ "Running 'TaskTearDown' for task $context.Peek().currentTaskName"
+}</dev:code>
+ <dev:remarks>
+ <maml:para>Description</maml:para>
+ <maml:para>-----------</maml:para>
+ <maml:para>The script above produces the following output:</maml:para>
+ <maml:para>Executing task, Clean...
+Running 'TaskTearDown' for task Clean
+Executing task, Compile...
+Running 'TaskTearDown' for task Compile
+Executing task, Test...
+Running 'TaskTearDown' for task Test
+
+Build Succeeded</maml:para>
+ <maml:para />
+ </dev:remarks>
+ <command:commandLines>
+ <command:commandLine>
+ <command:commandText />
+ </command:commandLine>
+ </command:commandLines>
+ </command:example>
+ </command:examples>
+ <maml:relatedLinks>
+ <maml:navigationLink>
+ <maml:linkText>Task</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Include</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Properties</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Invoke-psake</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>TaskSetup</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>TaskTearDown</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Assert</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ </maml:relatedLinks>
+ </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">
+ <command:details>
+ <command:name>TaskSetup</command:name>
+ <maml:description>
+ <maml:para>Adds a scriptblock that will be executed before each task</maml:para>
+ </maml:description>
+ <maml:copyright>
+ <maml:para />
+ </maml:copyright>
+ <command:verb></command:verb>
+ <command:noun></command:noun>
+ <dev:version />
+ </command:details>
+ <maml:description>
+ <maml:para>This function will accept a scriptblock that will be executed before each
+task in the build script.</maml:para>
+ </maml:description>
+ <command:syntax>
+ <command:syntaxItem>
+ <command:name>TaskSetup</command:name>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>setup</maml:name>
+ <command:parameterValue required="true" variableLength="false">ScriptBlock</command:parameterValue>
+ </command:parameter>
+ </command:syntaxItem>
+ </command:syntax>
+ <command:parameters>
+ <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>setup</maml:name>
+ <maml:description>
+ <maml:para>A scriptblock to execute</maml:para>
+ </maml:description>
+ <command:parameterValue required="true" variableLength="false">ScriptBlock</command:parameterValue>
+ <dev:type>
+ <maml:name>ScriptBlock</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ </command:parameters>
+ <command:inputTypes>
+ <command:inputType>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para />
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:inputType>
+ </command:inputTypes>
+ <command:returnValues>
+ <command:returnValue>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para></maml:para>
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:returnValue>
+ </command:returnValues>
+ <command:terminatingErrors />
+ <command:nonTerminatingErrors />
+ <maml:alertSet>
+ <maml:title></maml:title>
+ <maml:alert>
+ <maml:para></maml:para>
+ </maml:alert>
+ </maml:alertSet>
+ <command:examples>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 1 --------------</maml:title>
+ <maml:introduction>
+ <maml:para>C:\PS&gt;</maml:para>
+ </maml:introduction>
+ <dev:code>A sample build script is shown below:
+
+Task default -depends Test
+
+Task Test -depends Compile, Clean {
+}
+
+Task Compile -depends Clean {
+}
+
+Task Clean {
+}
+
+TaskSetup {
+ "Running 'TaskSetup' for task $context.Peek().currentTaskName"
+}</dev:code>
+ <dev:remarks>
+ <maml:para>Description</maml:para>
+ <maml:para>-----------</maml:para>
+ <maml:para>The script above produces the following output:</maml:para>
+ <maml:para>Running 'TaskSetup' for task Clean
+Executing task, Clean...
+Running 'TaskSetup' for task Compile
+Executing task, Compile...
+Running 'TaskSetup' for task Test
+Executing task, Test...
+
+Build Succeeded</maml:para>
+ <maml:para />
+ </dev:remarks>
+ <command:commandLines>
+ <command:commandLine>
+ <command:commandText />
+ </command:commandLine>
+ </command:commandLines>
+ </command:example>
+ </command:examples>
+ <maml:relatedLinks>
+ <maml:navigationLink>
+ <maml:linkText>Task</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Include</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Properties</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Invoke-psake</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>FormatTaskName</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>TaskTearDown</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Assert</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ </maml:relatedLinks>
+ </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">
+ <command:details>
+ <command:name>FormatTaskName</command:name>
+ <maml:description>
+ <maml:para>This function allows you to change how psake renders the task name during a build.</maml:para>
+ </maml:description>
+ <maml:copyright>
+ <maml:para />
+ </maml:copyright>
+ <command:verb></command:verb>
+ <command:noun></command:noun>
+ <dev:version />
+ </command:details>
+ <maml:description>
+ <maml:para>This function takes either a string which represents a format string (formats using the -f format operator see “help about_operators”) or it can accept a script block that has a single parameter that is the name of the task that will be executed.</maml:para>
+ </maml:description>
+ <command:syntax>
+ <command:syntaxItem>
+ <command:name>FormatTaskName</command:name>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>format</maml:name>
+ <command:parameterValue required="true" variableLength="false">String or ScriptBlock</command:parameterValue>
+ </command:parameter>
+ </command:syntaxItem>
+ </command:syntax>
+ <command:parameters>
+ <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>format</maml:name>
+ <maml:description>
+ <maml:para>A format string or a scriptblock to execute</maml:para>
+ </maml:description>
+ <command:parameterValue required="true" variableLength="false">String or ScriptBlock</command:parameterValue>
+ <dev:type>
+ <maml:name>String or ScriptBlock</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ </command:parameters>
+ <command:inputTypes>
+ <command:inputType>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para />
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:inputType>
+ </command:inputTypes>
+ <command:returnValues>
+ <command:returnValue>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para></maml:para>
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:returnValue>
+ </command:returnValues>
+ <command:terminatingErrors />
+ <command:nonTerminatingErrors />
+ <maml:alertSet>
+ <maml:title></maml:title>
+ <maml:alert>
+ <maml:para></maml:para>
+ </maml:alert>
+ </maml:alertSet>
+ <command:examples>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 1 --------------</maml:title>
+ <maml:introduction>
+ <maml:para>C:\PS&gt;</maml:para>
+ </maml:introduction>
+ <dev:code>A sample build script that uses a format string is shown below:
+
+Task default -depends TaskA, TaskB, TaskC
+
+FormatTaskName "-------- {0} --------"
+
+Task TaskA {
+ "TaskA is executing"
+}
+
+Task TaskB {
+ "TaskB is executing"
+}
+
+Task TaskC {
+ "TaskC is executing"
+}</dev:code>
+ <dev:remarks>
+ <maml:para>Description</maml:para>
+ <maml:para>-----------</maml:para>
+ <maml:para>The script above produces the following output:</maml:para>
+ <maml:para>-------- TaskA --------
+TaskA is executing
+-------- TaskB --------
+TaskB is executing
+-------- TaskC --------
+TaskC is executing
+
+Build Succeeded!</maml:para>
+ <maml:para />
+ </dev:remarks>
+ <command:commandLines>
+ <command:commandLine>
+ <command:commandText />
+ </command:commandLine>
+ </command:commandLines>
+ </command:example>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 2 --------------</maml:title>
+ <maml:introduction>
+ <maml:para>C:\PS&gt;</maml:para>
+ </maml:introduction>
+ <dev:code>A sample build script that uses a ScriptBlock is shown below:
+
+Task default -depends TaskA, TaskB, TaskC
+
+FormatTaskName {
+ param($taskName)
+ write-host "Executing Task: $taskName" -foregroundcolor blue
+}
+
+Task TaskA {
+ "TaskA is executing"
+}
+
+Task TaskB {
+ "TaskB is executing"
+}
+
+Task TaskC {
+ "TaskC is executing"
+}</dev:code>
+ <dev:remarks>
+ <maml:para>Description</maml:para>
+ <maml:para>-----------</maml:para>
+ <maml:para>The preceding example uses the scriptblock parameter to the FormatTaskName function to render each task name in the color blue.</maml:para>
+ <maml:para>Note: the $taskName parameter is arbitrary it could be named anything</maml:para>
+ <maml:para />
+ </dev:remarks>
+ <command:commandLines>
+ <command:commandLine>
+ <command:commandText />
+ </command:commandLine>
+ </command:commandLines>
+ </command:example>
+ </command:examples>
+ <maml:relatedLinks>
+ <maml:navigationLink>
+ <maml:linkText>Task</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Include</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Properties</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Invoke-psake</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>TaskSetup</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>TaskTearDown</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Assert</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ </maml:relatedLinks>
+ </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">
+ <command:details>
+ <command:name>Include</command:name>
+ <maml:description>
+ <maml:para>Include the functions or code of another powershell script file into the current build script's scope</maml:para>
+ </maml:description>
+ <maml:copyright>
+ <maml:para />
+ </maml:copyright>
+ <command:verb></command:verb>
+ <command:noun></command:noun>
+ <dev:version />
+ </command:details>
+ <maml:description>
+ <maml:para>A build script may declare an "includes" function which allows you to define a file containing powershell code to be included and added to the scope of the currently running build script.</maml:para>
+ </maml:description>
+ <command:syntax>
+ <command:syntaxItem>
+ <command:name>Include</command:name>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>fileNamePathToInclude</maml:name>
+ <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
+ </command:parameter>
+ </command:syntaxItem>
+ </command:syntax>
+ <command:parameters>
+ <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>fileNamePathToInclude</maml:name>
+ <maml:description>
+ <maml:para>A string containing the path and name of the powershell file to include</maml:para>
+ </maml:description>
+ <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
+ <dev:type>
+ <maml:name>String</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ </command:parameters>
+ <command:inputTypes>
+ <command:inputType>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para />
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:inputType>
+ </command:inputTypes>
+ <command:returnValues>
+ <command:returnValue>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para></maml:para>
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:returnValue>
+ </command:returnValues>
+ <command:terminatingErrors />
+ <command:nonTerminatingErrors />
+ <maml:alertSet>
+ <maml:title></maml:title>
+ <maml:alert>
+ <maml:para></maml:para>
+ </maml:alert>
+ </maml:alertSet>
+ <command:examples>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 1 --------------</maml:title>
+ <maml:introduction>
+ <maml:para>C:\PS&gt;</maml:para>
+ </maml:introduction>
+ <dev:code>A sample build script is shown below:
+
+Include ".\build_utils.ps1"
+
+Task default -depends Test
+
+Task Test -depends Compile, Clean {
+}
+
+Task Compile -depends Clean {
+}
+
+Task Clean {
+}</dev:code>
+ <dev:remarks>
+ <maml:para>Description</maml:para>
+ <maml:para>-----------</maml:para>
+ <maml:para>The script above includes all the functions and variables defined in the ".\build_utils.ps1" script into the current build script's scope</maml:para>
+ <maml:para>Note: You can have more than 1 "Include" function defined in the build script</maml:para>
+ </dev:remarks>
+ <command:commandLines>
+ <command:commandLine>
+ <command:commandText />
+ </command:commandLine>
+ </command:commandLines>
+ </command:example>
+
+ </command:examples>
+ <maml:relatedLinks>
+ <maml:navigationLink>
+ <maml:linkText>Task</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>FormatTaskName</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Properties</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Invoke-psake</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>TaskSetup</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>TaskTearDown</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Assert</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ </maml:relatedLinks>
+ </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">
+ <command:details>
+ <command:name>Properties</command:name>
+ <maml:description>
+ <maml:para>Define a scriptblock that contains assignments to variables that will be available to all tasks in the build script</maml:para>
+ </maml:description>
+ <maml:copyright>
+ <maml:para />
+ </maml:copyright>
+ <command:verb></command:verb>
+ <command:noun></command:noun>
+ <dev:version />
+ </command:details>
+ <maml:description>
+ <maml:para>A build script may declare a "Properies" function which allows you to define variables that will be available to all the "Task" functions in the build script. </maml:para>
+ </maml:description>
+ <command:syntax>
+ <command:syntaxItem>
+ <command:name>Properties</command:name>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>properties</maml:name>
+ <command:parameterValue required="true" variableLength="false">ScriptBlock</command:parameterValue>
+ </command:parameter>
+ </command:syntaxItem>
+ </command:syntax>
+ <command:parameters>
+ <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>properties</maml:name>
+ <maml:description>
+ <maml:para>The script block containing all the variable assignment statements</maml:para>
+ </maml:description>
+ <command:parameterValue required="true" variableLength="false">ScriptBlock</command:parameterValue>
+ <dev:type>
+ <maml:name>ScriptBlock</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ </command:parameters>
+ <command:inputTypes>
+ <command:inputType>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para />
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:inputType>
+ </command:inputTypes>
+ <command:returnValues>
+ <command:returnValue>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para></maml:para>
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:returnValue>
+ </command:returnValues>
+ <command:terminatingErrors />
+ <command:nonTerminatingErrors />
+ <maml:alertSet>
+ <maml:title></maml:title>
+ <maml:alert>
+ <maml:para></maml:para>
+ </maml:alert>
+ </maml:alertSet>
+ <command:examples>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 1 --------------</maml:title>
+ <maml:introduction>
+ <maml:para>C:\PS&gt;</maml:para>
+ </maml:introduction>
+ <dev:code>A sample build script is shown below:
+
+Properties {
+ $build_dir = "c:\build"
+ $connection_string = "datasource=localhost;initial catalog=northwind;integrated security=sspi"
+}
+
+Task default -depends Test
+
+Task Test -depends Compile, Clean {
+}
+
+Task Compile -depends Clean {
+}
+
+Task Clean {
+}</dev:code>
+ <dev:remarks>
+ <maml:para>Description</maml:para>
+ <maml:para>-----------</maml:para>
+ <maml:para>Note: You can have more than 1 "Properties" function defined in the build script</maml:para>
+ <maml:para></maml:para>
+ <maml:para></maml:para>
+ <maml:para></maml:para>
+ </dev:remarks>
+ <command:commandLines>
+ <command:commandLine>
+ <command:commandText />
+ </command:commandLine>
+ </command:commandLines>
+ </command:example>
+
+ </command:examples>
+ <maml:relatedLinks>
+ <maml:navigationLink>
+ <maml:linkText>Task</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>FormatTaskName</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Include</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Invoke-psake</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>TaskSetup</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>TaskTearDown</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Assert</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ </maml:relatedLinks>
+ </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">
+ <command:details>
+ <command:name>Task</command:name>
+ <maml:description>
+ <maml:para>Defines a build task to be executed by psake</maml:para>
+ </maml:description>
+ <maml:copyright>
+ <maml:para />
+ </maml:copyright>
+ <command:verb></command:verb>
+ <command:noun></command:noun>
+ <dev:version />
+ </command:details>
+ <maml:description>
+ <maml:para>This function creates a 'task' object that will be used by the psake engine to execute a build task. Note: There must be at least one task called 'default' in the build script</maml:para>
+ </maml:description>
+ <command:syntax>
+ <command:syntaxItem>
+ <command:name>Task</command:name>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>Name</maml:name>
+ <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
+ </command:parameter>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>Action</maml:name>
+ <command:parameterValue required="true" variableLength="false">ScriptBlock</command:parameterValue>
+ </command:parameter>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>PreAction</maml:name>
+ <command:parameterValue required="false" variableLength="false">ScriptBlock</command:parameterValue>
+ </command:parameter>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>PostAction</maml:name>
+ <command:parameterValue required="false" variableLength="false">ScriptBlock</command:parameterValue>
+ </command:parameter>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>Precondition</maml:name>
+ <command:parameterValue required="false" variableLength="false">ScriptBlock</command:parameterValue>
+ </command:parameter>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>Postcondition</maml:name>
+ <command:parameterValue required="false" variableLength="false">ScriptBlock</command:parameterValue>
+ </command:parameter>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>ContinueOnError</maml:name>
+ <command:parameterValue required="false" variableLength="false">Boolean</command:parameterValue>
+ </command:parameter>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>Depends</maml:name>
+ <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue>
+ </command:parameter>
+ <command:parameter require="false" variableLength="false" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>Description</maml:name>
+ <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue>
+ </command:parameter>
+ </command:syntaxItem>
+ </command:syntax>
+ <command:parameters>
+ <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>Name</maml:name>
+ <maml:description>
+ <maml:para>The name of the task</maml:para>
+ </maml:description>
+ <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
+ <dev:type>
+ <maml:name>String</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>Action</maml:name>
+ <maml:description>
+ <maml:para>A scriptblock containing the statements to execute for the task.</maml:para>
+ </maml:description>
+ <command:parameterValue required="true" variableLength="false">ScriptBlock</command:parameterValue>
+ <dev:type>
+ <maml:name>ScriptBlock</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>PreAction</maml:name>
+ <maml:description>
+ <maml:para>A scriptblock to be executed before the 'Action' scriptblock. Note: This parameter is ignored if the 'Action' scriptblock is not defined.</maml:para>
+ </maml:description>
+ <command:parameterValue required="false" variableLength="false">ScriptBlock</command:parameterValue>
+ <dev:type>
+ <maml:name>ScriptBlock</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>PostAction</maml:name>
+ <maml:description>
+ <maml:para>A scriptblock to be executed after the 'Action' scriptblock. Note: This parameter is ignored if the 'Action' scriptblock is not defined.</maml:para>
+ </maml:description>
+ <command:parameterValue required="false" variableLength="false">ScriptBlock</command:parameterValue>
+ <dev:type>
+ <maml:name>ScriptBlock</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>Precondition</maml:name>
+ <maml:description>
+ <maml:para>A scriptblock that is executed to determine if the task is executed or skipped. This scriptblock should return $true or $false</maml:para>
+ </maml:description>
+ <command:parameterValue required="false" variableLength="false">ScriptBlock</command:parameterValue>
+ <dev:type>
+ <maml:name>ScriptBlock</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>Postcondition</maml:name>
+ <maml:description>
+ <maml:para>A scriptblock that is executed to determine if the task completed its job correctly. An exception is thrown if the scriptblock returns $false.</maml:para>
+ </maml:description>
+ <command:parameterValue required="false" variableLength="false">ScriptBlock</command:parameterValue>
+ <dev:type>
+ <maml:name>ScriptBlock</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>ContinueOnError</maml:name>
+ <maml:description>
+ <maml:para>If this switch parameter is set then the task will not cause the build to fail when an exception is thrown by the task</maml:para>
+ </maml:description>
+ <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
+ <dev:type>
+ <maml:name>SwitchParameter</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>Depends</maml:name>
+ <maml:description>
+ <maml:para>An array of task names that this task depends on. These tasks will be executed before the current task is executed.</maml:para>
+ </maml:description>
+ <command:parameterValue required="false" variableLength="false">String[]</command:parameterValue>
+ <dev:type>
+ <maml:name>String[]</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>Description</maml:name>
+ <maml:description>
+ <maml:para>A description of the task.</maml:para>
+ </maml:description>
+ <command:parameterValue required="false" variableLength="false">String</command:parameterValue>
+ <dev:type>
+ <maml:name>String</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ </command:parameters>
+ <command:inputTypes>
+ <command:inputType>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para />
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:inputType>
+ </command:inputTypes>
+ <command:returnValues>
+ <command:returnValue>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para></maml:para>
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:returnValue>
+ </command:returnValues>
+ <command:terminatingErrors />
+ <command:nonTerminatingErrors />
+ <maml:alertSet>
+ <maml:title></maml:title>
+ <maml:alert>
+ <maml:para></maml:para>
+ </maml:alert>
+ </maml:alertSet>
+ <command:examples>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 1 --------------</maml:title>
+ <maml:introduction>
+ <maml:para>C:\PS&gt;</maml:para>
+ </maml:introduction>
+ <dev:code>A sample build script is shown below:
+
+Task default -Depends Test
+
+Task Test -Depends Compile, Clean {
+ "This is a test"
+}
+
+Task Compile -Depends Clean {
+ "Compile"
+}
+
+Task Clean {
+ "Clean"
+}
+
+The 'default' task is required and should not contain an 'Action' parameter.
+It uses the 'Depends' parameter to specify that 'Test' is a dependency
+
+The 'Test' task uses the 'Depends' parameter to specify that 'Compile' and 'Clean' are dependencies
+The 'Compile' task depends on the 'Clean' task.
+
+Note:
+The 'Action' parameter is defaulted to the script block following the 'Clean' task.
+
+An equivalent 'Test' task is shown below:
+
+Task Test -Depends Compile, Clean -Action {
+ $testMessage
+}
+
+The output for the above sample build script is shown below:
+Executing task, Clean...
+Clean
+Executing task, Compile...
+Compile
+Executing task, Test...
+This is a test
+
+Build Succeeded!
+
+----------------------------------------------------------------------
+Build Time Report
+----------------------------------------------------------------------
+Name Duration
+---- --------
+Clean 00:00:00.0065614
+Compile 00:00:00.0133268
+Test 00:00:00.0225964
+Total: 00:00:00.0782496</dev:code>
+ <dev:remarks>
+ <maml:para></maml:para>
+ <maml:para></maml:para>
+ <maml:para></maml:para>
+ </dev:remarks>
+ <command:commandLines>
+ <command:commandLine>
+ <command:commandText />
+ </command:commandLine>
+ </command:commandLines>
+ </command:example>
+
+ </command:examples>
+ <maml:relatedLinks>
+ <maml:navigationLink>
+ <maml:linkText>Properties</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>FormatTaskName</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Include</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Invoke-psake</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>TaskSetup</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>TaskTearDown</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Assert</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ </maml:relatedLinks>
+ </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">
+ <command:details>
+ <command:name>Assert</command:name>
+ <maml:description>
+ <maml:para>Helper function for "Design by Contract" assertion checking.</maml:para>
+ </maml:description>
+ <maml:copyright>
+ <maml:para />
+ </maml:copyright>
+ <command:verb></command:verb>
+ <command:noun></command:noun>
+ <dev:version />
+ </command:details>
+ <maml:description>
+ <maml:para>This is a helper function that makes the code less noisy by eliminating many of the "if" statements that are normally required to verify assumptions in the code.</maml:para>
+ </maml:description>
+ <command:syntax>
+ <command:syntaxItem>
+ <command:name>Assert</command:name>
+ <command:parameter require="true" variableLength="true" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>conditionToCheck</maml:name>
+ <command:parameterValue required="true" variableLength="false">Boolean</command:parameterValue>
+ </command:parameter>
+ <command:parameter require="true" variableLength="true" globbing="false" pipelineInput="false" postion="1">
+ <maml:name>failureMessage</maml:name>
+ <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
+ </command:parameter>
+ </command:syntaxItem>
+ </command:syntax>
+ <command:parameters>
+ <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>conditionToCheck</maml:name>
+ <maml:description>
+ <maml:para>The boolean condition to evaluate</maml:para>
+ </maml:description>
+ <command:parameterValue required="true" variableLength="true">Boolean</command:parameterValue>
+ <dev:type>
+ <maml:name>Boolean</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="false (ByValue)" position="1">
+ <maml:name>failureMessage</maml:name>
+ <maml:description>
+ <maml:para>The error message used for the exception if the conditionToCheck parameter is false</maml:para>
+ </maml:description>
+ <command:parameterValue required="true" variableLength="true">String</command:parameterValue>
+ <dev:type>
+ <maml:name>String</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ </command:parameters>
+ <command:inputTypes>
+ <command:inputType>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para />
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:inputType>
+ </command:inputTypes>
+ <command:returnValues>
+ <command:returnValue>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para></maml:para>
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:returnValue>
+ </command:returnValues>
+ <command:terminatingErrors />
+ <command:nonTerminatingErrors />
+ <maml:alertSet>
+ <maml:title></maml:title>
+ <maml:alert>
+ <maml:para></maml:para>
+ </maml:alert>
+ </maml:alertSet>
+ <command:examples>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 1 --------------</maml:title>
+ <maml:introduction>
+ <maml:para>C:\PS&gt;</maml:para>
+ </maml:introduction>
+ <dev:code>Assert $false "This always throws an exception"</dev:code>
+ <dev:remarks>
+ <maml:para></maml:para>
+ <maml:para></maml:para>
+ <maml:para></maml:para>
+ </dev:remarks>
+ <command:commandLines>
+ <command:commandLine>
+ <command:commandText />
+ </command:commandLine>
+ </command:commandLines>
+ </command:example>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 2 --------------</maml:title>
+ <maml:introduction>
+ <maml:para>C:\PS&gt;</maml:para>
+ </maml:introduction>
+ <dev:code>Assert ( ($i % 2) -eq 0 ) "$i is not an even number"</dev:code>
+ <dev:remarks>
+ <maml:para>Description</maml:para>
+ <maml:para>-----------</maml:para>
+ <maml:para>This exmaple may throw an exception if $i is not an even number</maml:para>
+ <maml:para></maml:para>
+ <maml:para>Note:</maml:para>
+ <maml:para>It might be necessary to wrap the condition with paranthesis to force PS to evaluate the condition
+so that a boolean value is calculated and passed into the 'conditionToCheck' parameter.
+
+Example:
+ Assert 1 -eq 2 "1 doesn't equal 2"
+
+PS will pass 1 into the condtionToCheck variable and PS will look for a parameter called "eq" and
+throw an exception with the following message "A parameter cannot be found that matches parameter name 'eq'"
+
+The solution is to wrap the condition in () so that PS will evaluate it first.
+
+ Assert (1 -eq 2) "1 doesn't equal 2"
+ </maml:para>
+ </dev:remarks>
+ <command:commandLines>
+ <command:commandLine>
+ <command:commandText />
+ </command:commandLine>
+ </command:commandLines>
+ </command:example>
+
+ </command:examples>
+ <maml:relatedLinks>
+ <maml:navigationLink>
+ <maml:linkText>Task</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>FormatTaskName</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Include</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Invoke-psake</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>TaskSetup</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>TaskTearDown</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Properties</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ </maml:relatedLinks>
+ </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">
+ <command:details>
+ <command:name>Exec</command:name>
+ <maml:description>
+ <maml:para>Helper function for executing command-line programs.</maml:para>
+ </maml:description>
+ <maml:copyright>
+ <maml:para />
+ </maml:copyright>
+ <command:verb></command:verb>
+ <command:noun></command:noun>
+ <dev:version />
+ </command:details>
+ <maml:description>
+ <maml:para>This is a helper function that runs a scriptblock and checks the PS variable $lastexitcode to see if an error occcured. If an error is detected then an exception is thrown. This function allows you to run command-line programs without having to explicitly check fthe $lastexitcode variable.</maml:para>
+ </maml:description>
+ <command:syntax>
+ <command:syntaxItem>
+ <command:name>Exec</command:name>
+ <command:parameter require="true" variableLength="true" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>cmd</maml:name>
+ <command:parameterValue required="true" variableLength="false">ScriptBlock</command:parameterValue>
+ </command:parameter>
+ <command:parameter require="true" variableLength="true" globbing="false" pipelineInput="false" postion="1">
+ <maml:name>errorMessage</maml:name>
+ <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
+ </command:parameter>
+ </command:syntaxItem>
+ </command:syntax>
+ <command:parameters>
+ <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>cmd</maml:name>
+ <maml:description>
+ <maml:para>The scriptblock to execute. This scriptblock will typically contain the command-line invocation.</maml:para>
+ </maml:description>
+ <command:parameterValue required="true" variableLength="true">ScriptBlock</command:parameterValue>
+ <dev:type>
+ <maml:name>Boolean</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="false (ByValue)" position="1">
+ <maml:name>failureMessage</maml:name>
+ <maml:description>
+ <maml:para>The error message used for the exception that is thrown.</maml:para>
+ </maml:description>
+ <command:parameterValue required="true" variableLength="true">String</command:parameterValue>
+ <dev:type>
+ <maml:name>String</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ </command:parameters>
+ <command:inputTypes>
+ <command:inputType>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para />
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:inputType>
+ </command:inputTypes>
+ <command:returnValues>
+ <command:returnValue>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para></maml:para>
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:returnValue>
+ </command:returnValues>
+ <command:terminatingErrors />
+ <command:nonTerminatingErrors />
+ <maml:alertSet>
+ <maml:title></maml:title>
+ <maml:alert>
+ <maml:para></maml:para>
+ </maml:alert>
+ </maml:alertSet>
+ <command:examples>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 1 --------------</maml:title>
+ <maml:introduction>
+ <maml:para>C:\PS&gt;</maml:para>
+ </maml:introduction>
+ <dev:code>exec { svn info $repository_trunk } "Error executing SVN. Please verify SVN command-line client is installed"</dev:code>
+ <dev:remarks>
+ <maml:para>This example calls the svn command-line client.</maml:para>
+ <maml:para></maml:para>
+ <maml:para></maml:para>
+ </dev:remarks>
+ <command:commandLines>
+ <command:commandLine>
+ <command:commandText />
+ </command:commandLine>
+ </command:commandLines>
+ </command:example>
+
+ </command:examples>
+ <maml:relatedLinks>
+ <maml:navigationLink>
+ <maml:linkText>Assert</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>FormatTaskName</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Include</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Invoke-psake</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Properties</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Task</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>TaskSetup</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>TaskTearDown</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ </maml:relatedLinks>
+ </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">
+ <command:details>
+ <command:name>Invoke-Task</command:name>
+ <maml:description>
+ <maml:para>Executes another task in the current build script.</maml:para>
+ </maml:description>
+ <maml:copyright>
+ <maml:para />
+ </maml:copyright>
+ <command:verb></command:verb>
+ <command:noun></command:noun>
+ <dev:version />
+ </command:details>
+ <maml:description>
+ <maml:para>This is a function that will allow you to invoke a Task from within another Task in the current build script.</maml:para>
+ </maml:description>
+ <command:syntax>
+ <command:syntaxItem>
+ <command:name>Invoke-Task</command:name>
+ <command:parameter require="true" variableLength="true" globbing="false" pipelineInput="false" postion="0">
+ <maml:name>taskName</maml:name>
+ <command:parameterValue required="true" variableLength="false">String</command:parameterValue>
+ </command:parameter>
+ </command:syntaxItem>
+ </command:syntax>
+ <command:parameters>
+ <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false (ByValue)" position="0">
+ <maml:name>taskName</maml:name>
+ <maml:description>
+ <maml:para>The name of the task to execute.</maml:para>
+ </maml:description>
+ <command:parameterValue required="true" variableLength="true">String</command:parameterValue>
+ <dev:type>
+ <maml:name>String</maml:name>
+ <maml:uri />
+ </dev:type>
+ <dev:defaultValue></dev:defaultValue>
+ </command:parameter>
+ </command:parameters>
+ <command:inputTypes>
+ <command:inputType>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para />
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:inputType>
+ </command:inputTypes>
+ <command:returnValues>
+ <command:returnValue>
+ <dev:type>
+ <maml:name>None</maml:name>
+ <maml:uri />
+ <maml:description>
+ <maml:para></maml:para>
+ </maml:description>
+ </dev:type>
+ <maml:description />
+ </command:returnValue>
+ </command:returnValues>
+ <command:terminatingErrors />
+ <command:nonTerminatingErrors />
+ <maml:alertSet>
+ <maml:title></maml:title>
+ <maml:alert>
+ <maml:para></maml:para>
+ </maml:alert>
+ </maml:alertSet>
+ <command:examples>
+ <command:example>
+ <maml:title>-------------- EXAMPLE 1 --------------</maml:title>
+ <maml:introduction>
+ <maml:para>C:\PS&gt;</maml:para>
+ </maml:introduction>
+ <dev:code>Invoke-Task "Compile"</dev:code>
+ <dev:remarks>
+ <maml:para>This example calls the "Compile" task.</maml:para>
+ <maml:para></maml:para>
+ <maml:para></maml:para>
+ </dev:remarks>
+ <command:commandLines>
+ <command:commandLine>
+ <command:commandText />
+ </command:commandLine>
+ </command:commandLines>
+ </command:example>
+
+ </command:examples>
+ <maml:relatedLinks>
+ <maml:navigationLink>
+ <maml:linkText>Assert</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Exec</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>FormatTaskName</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Include</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Invoke-psake</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Properties</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>Task</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>TaskSetup</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ <maml:navigationLink>
+ <maml:linkText>TaskTearDown</maml:linkText>
+ <maml:uri />
+ </maml:navigationLink>
+ </maml:relatedLinks>
+ </command:command>
+ </helpItems>
View
5 Packages/PSake/psake-config.ps1
@@ -0,0 +1,5 @@
+$config.framework = "4.0";
+$config.taskNameFormat="[{0}]";
+$config.exitCode="1";
+#$config.verboseError=$true;
+$config.coloredOutput = $true;
View
7 Packages/PSake/psake-help.ps1
@@ -0,0 +1,7 @@
+# Helper script to return help text.
+
+remove-module psake -ea 'SilentlyContinue'
+$scriptPath = Split-Path -parent $MyInvocation.MyCommand.path
+import-module (join-path $scriptPath psake.psm1)
+Get-Help Invoke-psake -full
+exit $lastexitcode
View
15 Packages/PSake/psake.cmd
@@ -0,0 +1,15 @@
+@echo off
+
+SET DIR=%~dp0%
+
+if '%1'=='/?' goto usage
+if '%1'=='-?' goto usage
+if '%1'=='?' goto usage
+if '%1'=='/help' goto usage
+if '%1'=='help' goto usage
+
+powershell -NoProfile -ExecutionPolicy unrestricted -Command "& '%DIR%psake.ps1' %*"
+
+goto :eof
+:usage
+powershell -NoProfile -ExecutionPolicy unrestricted -Command "& '%DIR%psake-help.ps1'"
View
37 Packages/PSake/psake.ps1
@@ -0,0 +1,37 @@
+# Helper script for those who want to run psake without importing the module.
+# Example:
+# .\psake.ps1 "default.ps1" "BuildHelloWord" "4.0"
+
+# Must match parameter definitions for psake.psm1/invoke-psake
+# otherwise named parameter binding fails
+param(
+ [Parameter(Position=0,Mandatory=0)]
+ [string]$buildFile = 'default.ps1',
+ [Parameter(Position=1,Mandatory=0)]
+ [string[]]$taskList = @(),
+ [Parameter(Position=2,Mandatory=0)]
+ [string]$framework,
+ [Parameter(Position=3,Mandatory=0)]
+ [switch]$docs = $false,
+ [Parameter(Position=4,Mandatory=0)]
+ [System.Collections.Hashtable]$parameters = @{},
+ [Parameter(Position=5, Mandatory=0)]
+ [System.Collections.Hashtable]$properties = @{},
+ [Parameter(Position=6, Mandatory=0)]
+ [string]$scriptPath = $(Split-Path -parent $MyInvocation.MyCommand.path),
+ [Parameter(Position=7, Mandatory=0)]
+ [switch]$nologo = $false
+)
+
+remove-module psake -ea 'SilentlyContinue'
+import-module (join-path $scriptPath psake.psm1)
+if (-not(test-path $buildFile))
+{
+ $absoluteBuildFile = (join-path $scriptPath $buildFile)
+ if (test-path $absoluteBuildFile)
+ {
+ $buildFile = $absoluteBuildFile
+ }
+}
+invoke-psake $buildFile $taskList $framework $docs $parameters $properties $nologo
+exit $lastexitcode
View
718 Packages/PSake/psake.psm1
@@ -0,0 +1,718 @@
+# psake
+# Copyright (c) 2010 James Kovacs
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+# THE SOFTWARE.
+
+#Requires -Version 2.0
+
+#Ensure that only one instance of the psake module is loaded
+remove-module psake -erroraction silentlycontinue
+
+#-- Public Module Functions --#
+
+# .ExternalHelp psake.psm1-help.xml
+function Invoke-Task
+{
+ [CmdletBinding()]
+ param(
+ [Parameter(Position=0,Mandatory=1)] [string]$taskName
+ )
+
+ Assert $taskName ($msgs.error_invalid_task_name)
+
+ $taskKey = $taskName.ToLower()
+
+ $currentContext = $psake.context.Peek()
+ $tasks = $currentContext.tasks
+ $executedTasks = $currentContext.executedTasks
+ $callStack = $currentContext.callStack
+
+ Assert ($tasks.Contains($taskKey)) ($msgs.error_task_name_does_not_exist -f $taskName)
+
+ if ($executedTasks.Contains($taskKey)) { return }
+
+ Assert (!$callStack.Contains($taskKey)) ($msgs.error_circular_reference -f $taskName)
+
+ $callStack.Push($taskKey)
+
+ $task = $tasks.$taskKey