Skip to content

Commit

Permalink
Update the setup script
Browse files Browse the repository at this point in the history
We are using `.tool-versions` on this project.

This commit updates the setup setup script to install the Ruby version
in `.tool-versions` if `asdf` is available.

Ref:
- https://asdf-vm.com/manage/configuration.html#tool-versions
- https://github.com/thoughtbot/guides
  • Loading branch information
smaboshe committed Apr 25, 2024
1 parent cafe43f commit 3452eec
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions bin/setup
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#!/usr/bin/env sh

# Set up Rails app. Run this script immediately after cloning the codebase.
# https://github.com/thoughtbot/guides/tree/master/protocol
# Set up asdf if available
if command -v asdf > /dev/null; then
printf 'Setting up tool dependencies via asdf...\n'
asdf plugin-add ruby https://github.com/asdf-vm/asdf-ruby || true
asdf plugin-update --all || true
asdf install
fi

# Set up Ruby dependencies via Bundler
if ! command -v bundle > /dev/null; then
Expand Down

0 comments on commit 3452eec

Please sign in to comment.