Skip to content

Commit

Permalink
ruby(tools): fix setup script
Browse files Browse the repository at this point in the history
  • Loading branch information
vpayno committed Oct 3, 2023
1 parent 160e649 commit 97a92fa
Showing 1 changed file with 82 additions and 2 deletions.
84 changes: 82 additions & 2 deletions .github/citools/ruby/ruby-setup-install
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,93 @@ main() {

print_ruler

echo Running: sudo apt install ruby-full
time sudo apt install -y ruby-full || ((retval++))
echo Running: sudo apt update
time sudo apt update || ((retval++))

print_ruler

local -a debs
debs=(
autoconf
automake
bison
build-essential
curl
g++
gcc
git
gnupg
libc6-dev
libffi-dev
libgdbm-dev
libgmp-dev
libncurses5-dev
libreadline-dev
libsqlite3-dev
libssl-dev
libtool
libyaml-dev
make
pkg-config
sqlite3
zlib1g-dev
)

echo Running: sudo apt install "${debs[@]}"
time sudo apt install -y "${debs[@]}" || ((retval++))

print_ruler

echo Running: curl -sL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-installer \| bash -
time curl -sL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-installer | bash - || ((retval++))

print_ruler

echo Running: rbenv -v
time rbenv -v || ((retval++))

print_ruler

# shellcheck disable=SC2016
echo 'export PATH="${HOME}/.rbenv/bin:${PATH}"' >>~/.bashrc
# shellcheck disable=SC2016
echo 'eval "$(rbenv init -)"' >>~/.bashrc
# shellcheck disable=SC1090
source ~/.bashrc

print_ruler

echo Running: rbenv install --list
time rbenv install --list || ((retval++))

print_ruler

local ruby_version
ruby_version="$(rbenv install --list 2>/dev/null | grep '^3[.]1[.]' | tail -n 1)" || ((retval++))

echo Running: rbenv install "${ruby_version}"
time rbenv install "${ruby_version}" || ((retval++))

print_ruler

echo Running: rbenv "${ruby_version}"
time rbenv global "${ruby_version}" || ((retval++))

print_ruler

echo Running: ruby -v
time ruby -v || ((retval++))

print_ruler

local -a gems
gems=(
rspec
rspec-core
rspec-expectations
rspec-mocks
rspec-parameterized
rspec-support
rubycritic
simplecov
simplecov-cobertura
Expand Down

0 comments on commit 97a92fa

Please sign in to comment.