Skip to content

Instantly share code, notes, and snippets.

@nordineb
Last active June 15, 2018 06:36
Show Gist options
  • Save nordineb/a83438ce1c5c0a0b2944b823143247b7 to your computer and use it in GitHub Desktop.
Save nordineb/a83438ce1c5c0a0b2944b823143247b7 to your computer and use it in GitHub Desktop.
Psake notes

install the module (Elevated powershell prompt)

Install-Module -Name psake

import the module

Import-Module psake

import teamcity helpers we use

Import-Module .\teamcity.psm1

list all tasks

Invoke-psake -nologo -docs .\default.ps1

run a specific task

Invoke-psake .\default.ps1 StartAzureStorageEmulator

override properties

Invoke-psake .\default.ps1 StartAzureStorageEmulator -properties @{"x"="1";"y"="2"}

Psake definition

  • Task - main function to execute a step of your build script
  • Depends - property that specify what the current step depends upon
  • default - there must always be a default task that will get executed if no initial task is specified
  • FormatTaskName - specifies how each step is displayed in the result window
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment