Commit 38462e01 authored by David Diederich's avatar David Diederich
Browse files

Bash ~= fun

parent b4389b24
...@@ -82,21 +82,21 @@ compile-and-unit-test: ...@@ -82,21 +82,21 @@ compile-and-unit-test:
# - Second argument is the name to use for the logfile # - Second argument is the name to use for the logfile
# - The remaining arguments are the maven command to run # - The remaining arguments are the maven command to run
- | - |
cat > maven-build.sh <<-EOF cat > maven-build.sh <<EOF
cd "$1"; shift cd "\$1"; shift
outputFile="$1"; shift outputFile="\$1"; shift
echo "********************************************************************************" echo "********************************************************************************"
pwd pwd
echo Running $MAVEN "$@" ... echo Running \$MAVEN "\$@" ...
if $MAVEN "$@" >& "$outputFile"; then if \$MAVEN "\$@" >& "\$outputFile"; then
tail -n 100 "$outputFile" tail -n 100 "\$outputFile";
echo '**** Showing the last 100 lines of the passed build (above). See Job artifacts for full log details *****' echo '**** Showing the last 100 lines of the passed build (above). See Job artifacts for full log details *****';
else else
tail -n 200 "$outputFile" tail -n 200 "\$outputFile";
echo '**** Showing the last 200 lines of the failed build (above). See Job artifacts for full log details *****' echo '**** Showing the last 200 lines of the failed build (above). See Job artifacts for full log details *****';
exit 255 exit 255;
fi fi
EOF EOF
- cat maven-build.sh - cat maven-build.sh
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment