Psake
   HOME

TheInfoList



OR:

psake is a
domain-specific language A domain-specific language (DSL) is a computer language specialized to a particular application domain. This is in contrast to a general-purpose language (GPL), which is broadly applicable across domains. There are a wide variety of DSLs, ranging f ...
and build automation tool written in
PowerShell PowerShell is a task automation and configuration management program from Microsoft, consisting of a command-line shell (computing), shell and the associated scripting language. Initially a Windows component only, known as Windows PowerShell, it ...
to create builds using a dependency pattern similar to
Rake Rake may refer to: * Rake (stock character), a man habituated to immoral conduct * Rake (theatre), the artificial slope of a theatre stage Science and technology * Rake receiver, a radio receiver * Rake (geology), the angle between a feature on a ...
or
MSBuild Microsoft Build Engine, or MSBuild, is a set of free and open-source build tools for managed code under the Common Language Infrastructure as well as native C and C++ code. It was first released in 2003 and was a part of .NET Framework. MSBuil ...
. It intends to simplify the build language as compared to MSBuild scripting.ASP.NET - Topshelf and Katana: A Unified Web and Service Architecture ; MSDN Magazine June 2014 ; https://msdn.microsoft.com/en-us/magazine/dn745865.aspx


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 Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. T ...
, you have a lot more freedom and flexibility in your build scripts. You can use all the features of PowerShell and the
.NET Framework The .NET Framework (pronounced as "''dot net"'') is a proprietary software framework developed by Microsoft that runs primarily on Microsoft Windows. It was the predominant implementation of the Common Language Infrastructure (CLI) until bein ...
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 b
James Kovacs
as a PowerShell V1 script file * May 2009 - psake re-written as a PowerShell V2 module by Jorge Matos


References


External links

*
psake ReadTheDocs

psake NuGet package
{{CCBYSASource, sourcepath=https://wiki.github.com/JamesKovacs/psake/how-does-psake-work, sourcearticle=How does psake work?, revision=359204392 Domain-specific programming languages Programming tools Build automation Software using the MIT license