aboutsummaryrefslogtreecommitdiffstats
path: root/appveyor.ps1
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2015-09-27 21:15:54 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2015-09-27 21:15:54 +0200
commit3b94a2b108070cfb5e2095eecbaeac02165cc334 (patch)
treeded6d9d5716cb3d169537411b56c895b94be262b /appveyor.ps1
parent362056f315504b2c06d41e915dd6b700109d4e61 (diff)
downloadsonarqube-3b94a2b108070cfb5e2095eecbaeac02165cc334.tar.gz
sonarqube-3b94a2b108070cfb5e2095eecbaeac02165cc334.zip
Add AppVeyor configuration
Diffstat (limited to 'appveyor.ps1')
-rw-r--r--appveyor.ps129
1 files changed, 29 insertions, 0 deletions
diff --git a/appveyor.ps1 b/appveyor.ps1
new file mode 100644
index 00000000000..d7ce18e5f03
--- /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"""
+ }
+}