summaryrefslogtreecommitdiffstats
path: root/appveyor.ps1
diff options
context:
space:
mode:
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"""
+ }
+}