1
0
Fork 0
mirror of https://github.com/nishiki/is_master.git synced 2024-11-23 03:27:51 +00:00
is_master/.docker-test

25 lines
610 B
Bash

#!/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