blob: d7ce18e5f032130880fcbc6a3f9dffa7b249d181 (
plain)
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
29
|
$ErrorActionPreference = "Stop"
function CheckLastExitCode
{
param ([int[]]$SuccessCodes = @(0))
if ($SuccessCodes -notcontains $LastExitCode)
{
$msg = @"
EXE RETURNED EXIT CODE $LastExitCode
CALLSTACK:$(Get-PSCallStack | Out-String)
"@
throw $msg
}
}
switch ($env:RUN)
{
"ci"
{
mvn package "--batch-mode" "-B" "-e" "-V"
CheckLastExitCode
}
default
{
throw "Unexpected test mode: ""$env:RUN"""
}
}
|