From bb50ec2a9fad468a04f1a30d7b9b0f1499bf3bbc Mon Sep 17 00:00:00 2001 From: Priit Tamboom Date: Fri, 10 Oct 2014 13:24:54 +0300 Subject: [PATCH] Robot: exit with correct error code --- bin/robot-audit | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bin/robot-audit b/bin/robot-audit index 2a0158f8c..a33bb7b4d 100755 --- a/bin/robot-audit +++ b/bin/robot-audit @@ -23,17 +23,26 @@ echo "END_OF_GIT_LAST_COMMITS" echo "RUBOCOP_RESULTS" bundle exec rubocop +RCODE=$? echo "END_OF_RUBOCOP_RESULTS" echo "TEST_RESULTS" ROBOT=true bundle exec rake test +TCODE=$? echo "END_OF_TEST_RESULTS" echo "SECURITY_RESULTS" bundle exec bundle-audit update bundle exec bundle-audit +BCODE=$? bundle exec brakeman echo "END_OF_SECURITY_RESULTS" # update code review bundle exec rubycritic app lib + +if [ $RCODE == 0 ] && [ $TCODE == 0 ] &&[ $BCODE == 0 ]; then + exit 0 +else + exit 1 +fi