Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

40 lines (36 sloc) 0.87 kB
powershell -nologo -noprofile -output "Text" -command {
function runBuilds{
$buildFiles = dir examples\*.ps1
$testResults = @()
foreach($buildFile in $buildFiles) {
$testResult = "" | select Name, Result
$testResult.Name = $buildFile.Name
.\psake.ps1 $buildFile | Out-Null
$testResult.Result = (getResult $buildFile.Name $?)
$testResults += $testResult
}
return $testResults
}
function getResult([string]$fileName, [bool]$buildSucceeded) {
if ($fileName.StartsWith("bad")) {
if (!$buildSucceeded) {
"Passed"
}
else {
"Failed"
}
}
else {
if ($buildSucceeded) {
"Passed"
}
else {
"Failed"
}
}
}
$results = runBuilds
$results | ft -auto
$failed = $results | ? { $_.Result -eq "Failed" }
if ($failed) {exit 1} else {exit 0}
}
Jump to Line
Something went wrong with that request. Please try again.