peachpie/MyGet.ps1

28 строки
698 B
PowerShell
Исходник Постоянная ссылка Обычный вид История

# Diagnostic
function Write-Diagnostic {
param([string]$message)
Write-Host
Write-Host -f green $message
Write-Host
}
function Die([string]$message, [object[]]$output) {
if ($output) { Write-Output $output }
Write-Error $message
exit 1
}
2017-04-15 14:37:26 +03:00
function Test([string]$projectpath) {
Write-Diagnostic "Testing $projectpath ..."
dotnet test .\src\Tests\$projectpath\$projectpath.csproj
if($LASTEXITCODE -ne 0) { Die("$projectpath failed.") }
}
2018-10-08 00:20:39 +03:00
.\build\build.ps1 -version "$env:PackageVersion" -config "$env:Configuration"
if($LASTEXITCODE -ne 0) { Die("Build failed.") }
2017-04-15 14:37:26 +03:00
Test "Peachpie.ScriptTests"
Test "Peachpie.DiagnosticTests"
Write-Diagnostic "Succeeded."