RIP
Tutorial
Tags
Topics
Examples
eBooks
Tutorial by Examples
Basic outline
Task Rebuild -Depends Clean, Build { "Rebuild" } Task Build { "Build" } Task Clean { "Clean" } Task default -Depends Build
FormatTaskName example
# Will display task as: # -------- Rebuild -------- # -------- Build -------- FormatTaskName "-------- {0} --------" # will display tasks in yellow colour: # Running Rebuild FormatTaskName { param($taskName) "Running $taskName" - foregroundcolor yellow } ...
Run Task conditionally
propreties { $isOk = $false } # By default the Build task won't run, unless there is a param $true Task Build -precondition { return $isOk } { "Build" } Task Clean { "Clean" } Task default -Depends Build
ContinueOnError
Task Build -depends Clean { "Build" } Task Clean -ContinueOnError { "Clean" throw "throw on purpose, but the task will continue to run" } Task default -Depends Build
Page 1 of 1
1
Cookie
This website stores cookies on your computer.
We use cookies to enhance your experience on our website and deliver personalized content.
For more details on our cookie usage, please review our
Cookie Policy
and
Privacy Policy
Accept all Cookies
Leave this website