public
Last active

exec rails_best_practices for jenkins plot plugin

  • Download Gist
rbp-to-jenkins-plot.sh
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#!/bin/sh
 
cd `dirname $0`/..
 
OUTDIR=reports
OUTFILE=$OUTDIR/rails_best_practices.properties
TMPFILE=`mktemp $OUTDIR/rails_best_practices.XXXXXX`
 
mkdir $OUTDIR 2> /dev/null
rails_best_practices > $TMPFILE
 
STATUS=$?
 
if [ $STATUS -eq 0 ]; then
echo "YVALUE=0" > $OUTFILE
else
NUM=`awk '/^Found [0-9]+ errors/{ print $2; }' < $TMPFILE`
echo "YVALUE=$NUM" > $OUTFILE
fi
 
rm $TMPFILE

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.