Skip to content

Commit

Permalink
Technical/Update script (#31)
Browse files Browse the repository at this point in the history
* Updated Ruby version
* Updated default gems list
* Added Postgres dependency
* Updated changelog
  • Loading branch information
bestwebua authored Sep 16, 2022
1 parent a2be782 commit 0c00840
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
24 changes: 15 additions & 9 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -54,29 +54,35 @@ 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"
sudo apt install code
}

# 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"
Expand All @@ -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']"
}
Expand Down

0 comments on commit 0c00840

Please sign in to comment.