Skip to content
This repository was archived by the owner on May 12, 2020. It is now read-only.

Commit 372ebdb

Browse files
authored
AppVeyor configuration to return correct exit code (#103)
AppVeyor configuration to return correct exit code
1 parent 0ab8b68 commit 372ebdb

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

.appveyor-run-mvn.bat

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ SET M2_HOME=
66
SET MAVEN_OPTS=-XX:MaxPermSize=2g -Xmx4g
77
SET JAVA_OPTS=-XX:MaxPermSize=2g -Xmx4g
88
SET PATH=C:\maven\apache-maven-3.2.5\bin;%JAVA_HOME%\bin;C:\Program Files\OpenSSH\bin;%PATH%
9-
mvn %*
9+
call mvn %*
10+
echo %errorlevel% 1> C:\Users\postgres\src\target\exit-code.txt

appveyor.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,17 @@ install:
2727
- cmd: SET PATH=C:\maven\apache-maven-3.2.5\bin;%JAVA_HOME%\bin;C:\Program Files\OpenSSH\bin;%PATH%
2828
- cmd: SET RSAKEY=C:\Program Files\OpenSSH\etc\ssh_host_rsa_key
2929
build_script:
30-
- ssh.exe -i "%RSAKEY%" -oStrictHostKeyChecking=no postgres@localhost "cd ~/src && cmd /c .appveyor-run-mvn.bat clean install -B -DskipTests -Djna.nosys=true" & exit %ERRORLEVEL%
30+
- ssh.exe -i "%RSAKEY%" -oStrictHostKeyChecking=no postgres@localhost "cd ~/src && cmd /c .appveyor-run-mvn.bat clean install -B -DskipTests -Djna.nosys=true"
31+
- echo errorlevel=%ERRORLEVEL%
32+
- set /p EXITCODE=<C:\Users\postgres\src\target\exit-code.txt
33+
- echo exitcode=%EXITCODE%
34+
- exit %EXITCODE%
3135
test_script:
32-
- ssh.exe -i "%RSAKEY%" -oStrictHostKeyChecking=no postgres@localhost "cd ~/src && cmd /c .appveyor-run-mvn.bat clean install -B -Djna.nosys=true" & exit %ERRORLEVEL%
36+
- ssh.exe -i "%RSAKEY%" -oStrictHostKeyChecking=no postgres@localhost "cd ~/src &&cmd /c .appveyor-run-mvn.bat clean install -B -Djna.nosys=true"
37+
- echo errorlevel=%ERRORLEVEL%
38+
- set /p EXITCODE=<C:\Users\postgres\src\target\exit-code.txt
39+
- echo exitcode=%EXITCODE%
40+
- exit %EXITCODE%
3341
cache:
3442
- C:\openssh\
3543
- C:\maven\

0 commit comments

Comments
 (0)