-
-
Notifications
You must be signed in to change notification settings - Fork 200
/
MyGet.ps1
28 lines (22 loc) · 698 Bytes
/
MyGet.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# 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
}
function Test([string]$projectpath) {
Write-Diagnostic "Testing $projectpath ..."
dotnet test .\src\Tests\$projectpath\$projectpath.csproj
if($LASTEXITCODE -ne 0) { Die("$projectpath failed.") }
}
.\build\build.ps1 -version "$env:PackageVersion" -config "$env:Configuration"
if($LASTEXITCODE -ne 0) { Die("Build failed.") }
Test "Peachpie.ScriptTests"
Test "Peachpie.DiagnosticTests"
Write-Diagnostic "Succeeded."