logo
  • 教程列表
  • SO官方文檔
  • Psake 簡介
    • 基本概要
    • FormatTaskName 示例
    • 有條件地執行任務
    • ContinueOnError
  1. StackOverflow 文件
  2. PowerShell 教程
  3. Psake 簡介
  4. 有條件地執行任務

有條件地執行任務

Created: November-22, 2018

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
  • FormatTaskName 示例

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明