Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

exec rails_best_practices for jenkins plot plugin

View rbp-to-jenkins-plot.sh
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.