Psake
Stable release |
4.4.1
/ November 19, 2014 |
---|---|
Written in | PowerShell |
Operating system | Cross-platform |
Type | Software development tools |
License | MIT License |
Website |
github |
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 is intends to simplify the build language as compared to MSBuild scripting.[1]
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 {
"build"
}
Task Compile -Depends Clean, Init {
"compile"
}
Task Clean -Depends Init {
"clean"
}
Task Init {
"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
- May 2008 - psake originally written by James Kovacs as a PowerShell V1 script file
- May 2009 - psake re-written as a PowerShell V2 module by Jorge Matos
External links
References
- ↑ ASP.NET - Topshelf and Katana: A Unified Web and Service Architecture ; MSDN Magazine June 2014 ; https://msdn.microsoft.com/en-us/magazine/dn745865.aspx
As of this edit, this article uses content from "How does psake work?", which is licensed in a way that permits reuse under the Creative Commons Attribution-ShareAlike 3.0 Unported License, but not under the GFDL. All relevant terms must be followed.