From 9a68a2d3c1fae2db95fd628de1b08732fe5ea2d6 Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Fri, 5 Feb 2016 18:02:30 +0800 Subject: [PATCH] jenkins ruby versioning smarter --- bin/jenkins-test.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/jenkins-test.sh b/bin/jenkins-test.sh index 193b109f..2e54f9d3 100755 --- a/bin/jenkins-test.sh +++ b/bin/jenkins-test.sh @@ -4,8 +4,11 @@ #sudo aptitude -q -y install libpq-dev source "$HOME/.rvm/scripts/rvm" -rvm install $(cat .ruby-version) -rvm gemset use $(cat .ruby-gemset) +rvm use $(cat.ruby-version) || \ + rvm install $(cat .ruby-version) +rvm gemset use $(cat .ruby-gemset) || \ + rvm gemset create $(cat .ruby-gemset) && \ + rvm gemset use $(cat .ruby-gemset) gem install bundler set -x