réplica de
https://github.com/SonarSource/sonarqube.git
synced 2024-08-10 14:10:47 +02:00
30 líneas
443 B
PowerShell
30 líneas
443 B
PowerShell
$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"""
|
|
}
|
|
}
|