| export WORKDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
| export BUILD_OUTPUT=$WORKDIR/build.out |
| echo Tailing the last 500 lines of output: |
| echo ERROR: An error was encountered with the build. |
| # If an error occurs, run our error handler to output a tail of the build |
| # Set up a repeating loop to send some output to Travis. |
| bash -c "while true; do tail -5 $BUILD_OUTPUT; sleep $PING_SLEEP; done" & |
| if [ "$1" = "glassfish-copyright:copyright" ]; then |
| mvn glassfish-copyright:copyright |
| mvn -e -U -B clean install $1 >> $BUILD_OUTPUT 2>&1 |
| # The build finished without returning an error so dump a tail of the output |
| # nicely terminate the ping output loop |