Psake


psake is a domain-specific language and build automation tool written in PowerShell to create builds using a dependency pattern similar to Rake or MSBuild. It intends to simplify the build language as compared to MSBuild scripting.

Overview

A build script consists of Tasks. Each Task is a function that can define dependencies on other Task functions.
The following is an example psake script:

Task default -Depends Build
Task Build -Depends Init,Clean,Compile
Task Compile -Depends Clean, Init
Task Clean -Depends Init
Task Init

psake executes the Task functions and enforces the dependencies between tasks. Since psake is written in a real programming language and not XML, you have a lot more freedom and flexibility in your build scripts. You can use all the features of PowerShell and the.NET Framework within your build.
The output of running psake on the script above is shown below:

PS >.\psake.ps1 default.ps1
Executing task: Init
init
Executing task: Clean
clean
Executing task: Compile
compile
Executing task: Build
compile
Build Succeeded!
----------------------------------------------------------------------
Build Time Report
----------------------------------------------------------------------
Name Duration
---- --------
Init 00:00:00.0140878
Clean 00:00:00.0113634
Compile 00:00:00.0334894
Build 00:00:00.1288015
Total: 00:00:00.4693739

History