Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update specific ruby version for a specific branch #631

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -12,6 +12,12 @@ Add a new [build command](/docs/customizing-build-commands.html) that will set t
if [ "$BRANCH_NAME" = "ruby-2" ]; then rbenv local 2.0.0-p247 ; fi
```

Use specific ruby version for a specific branch:

```bash
if [ "$BRANCH_NAME" = "ruby-2.6" ]; then cd ~/.rbenv/plugins/ruby-build && git pull && cd $SEMAPHORE_PROJECT_DIR && rbenv install 2.6.0 && rbenv local 2.6.0 && gem install bundler ; fi
```

Another option is to add a [build command](/docs/customizing-build-commands.html) that reads and sets the ruby version from the first line of the Gemfile:

```bash
Expand Down