有條件地執行任務
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
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