From 0c00840b4517f18032c39619acd423a2ac71b731 Mon Sep 17 00:00:00 2001 From: Vladislav Trotsenko Date: Fri, 16 Sep 2022 13:30:41 +0200 Subject: [PATCH] Technical/Update script (#31) * Updated Ruby version * Updated default gems list * Added Postgres dependency * Updated changelog --- CHANGELOG.md | 5 +++++ README.md | 2 +- setup.sh | 24 +++++++++++++++--------- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e282e4..a896e2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.1.0] - 2022-09-16 + +- Updated to Ruby 3.1.2 +- Added Postgres dependencies + ## [1.0.0] - 2022-02-14 ### Added diff --git a/README.md b/README.md index b6dbbaa..acd86b3 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Automation script for spinning-up Ruby developer environment. Configure your dev ## Requirements/Preconditions -1. Fresh `Linux Ubuntu 20.04 LTS` / `Linux Ubuntu 21.10` +1. Fresh `Linux Ubuntu 20.04 LTS` / `Linux Ubuntu 21.10` or higher 2. `wget` system dependency 3. GitHub personal access token diff --git a/setup.sh b/setup.sh index b9f5d2e..54e15d4 100644 --- a/setup.sh +++ b/setup.sh @@ -20,7 +20,7 @@ git_username=$3 git_token=$4 steps_counter=0 steps_errors=() -final_step_index=7 +final_step_index=8 # Reurns colorized step title function step_title() { @@ -54,21 +54,27 @@ function step_2() { # Install asdf ruby plugin, requiered system dependencies, mri ruby 3.1.0, asdf config function step_3() { - step_title $1 "Installing ASDF Ruby plugin, build system dependencies, MRI Ruby 3.1.0" + step_title $1 "Installing ASDF Ruby plugin, build system dependencies, MRI Ruby 3.1.2" default_gems_config="$HOME/.default-gems" echo -n "" > ${default_gems_config} - printf %"s\n" bundler pry gem-ctags > ${default_gems_config} + printf %"s\n" bundler pry gem-ctags yard > ${default_gems_config} asdf_config="$HOME/.asdfrc" $(asdf plugin add ruby) sudo apt-get install -y make gcc libssl-dev libreadline-dev zlib1g-dev echo -n "" > ${asdf_config} echo "legacy_version_file = yes" >> ${asdf_config} - $(asdf install ruby 3.1.0) - $(asdf global ruby latest) + $(asdf install ruby 3.1.2) + $(asdf global ruby 3.1.2) } -# Install vscode +# Install Postgres, requiered system dependencies function step_4() { + step_title $1 "Installing Postgres and requiered system dependencies" + sudo apt-get install -y postgresql libpq-dev cmake +} + +# Install vscode +function step_5() { step_title $1 "Installing Visual Studio Code" wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add - sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" @@ -76,7 +82,7 @@ function step_4() { } # Configure git -function step_5() { +function step_6() { step_title $1 "Configuring git" wget https://raw.githubusercontent.com/RubyWorkout/frs/master/.gitignore_global credentials="$HOME/.my-credentials" @@ -94,13 +100,13 @@ function step_5() { } # Configure vscode -function step_6() { +function step_7() { step_title $1 "Configuring Visual Studio Code" wget https://raw.githubusercontent.com/RubyWorkout/frs/master/settings.json -P ~/.config/Code/User } # Add shortcuts to dock -function step_7() { +function step_8() { step_title $1 "Adding favorites to dock" gsettings set org.gnome.shell favorite-apps "['firefox.desktop', 'org.gnome.Nautilus.desktop', 'snap-store_ubuntu-software.desktop', 'org.gnome.Terminal.desktop', 'code.desktop']" }