#!/bin/bash ruby_version=${1:-2.4.2} if ! rvm use "ruby-${ruby_version}" &>/dev/null ; then echo "The ruby version '${ruby_version}' doesn't exist!" echo "Available versions are:" rvm list rubies strings | cut -d '-' -f2 exit 2 fi echo '# ---------------------------------' echo "# Use ruby version: ${ruby_version}" echo '# ---------------------------------' cp -r /is_master ~/is_master cd ~/is_master gem install bundler --no-ri --no-rdoc bundle install gem build is_master.gemspec gem install "is_master-$(cat VERSION).gem" rubocop ruby ./test/test_cli_master.rb ruby ./test/test_cli_slave.rb