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