diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2015-11-18 11:52:28 +0100 |
---|---|---|
committer | Duarte Meneses <duarte.meneses@sonarsource.com> | 2015-11-18 11:52:28 +0100 |
commit | 1544db3e40a7de95d411dc2e7c96be3eb07f896f (patch) | |
tree | a05fb201dce48b8c346eebb642d8bb4d61f03499 /appveyor.ps1 | |
parent | 7b6c311c7d076de58cb57b28c6a9a31d5c7c9afe (diff) | |
download | sonar-scanner-cli-1544db3e40a7de95d411dc2e7c96be3eb07f896f.tar.gz sonar-scanner-cli-1544db3e40a7de95d411dc2e7c96be3eb07f896f.zip |
SQSCANNER-8 Execute ITs on Windows using AppVeyor
Diffstat (limited to 'appveyor.ps1')
-rw-r--r-- | appveyor.ps1 | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/appveyor.ps1 b/appveyor.ps1 new file mode 100644 index 0000000..d7ce18e --- /dev/null +++ b/appveyor.ps1 @@ -0,0 +1,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""" + } +} |