-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow
install
command's version parameter to be evaluated (#102)
* feat: allow evaluation of `version` param This will allow support of users passing in env vars, like `'${MY_RUBY_VERSION}'` or things like `'$(cat foo/bar/.ruby-version)'`. * chore: modify integration-test CI job to use Ruby 2.7.5 as per demo rails project * docs: update description for commands.install.parameters.version.description * test: add additional test for installing Ruby version specified in env var
- Loading branch information
1 parent
20485a7
commit 365d475
Showing
3 changed files
with
32 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
rvm install "$PARAM_VERSION" | ||
rvm use "$PARAM_VERSION" | ||
PARAM_RUBY_VERSION=$(eval echo "${PARAM_VERSION}") | ||
|
||
readonly ruby_path="$(rvm $PARAM_VERSION 1> /dev/null 2> /dev/null && rvm env --path)" | ||
printf '%s\n' "source $ruby_path" >> $BASH_ENV | ||
rvm install "$PARAM_RUBY_VERSION" | ||
rvm use "$PARAM_RUBY_VERSION" | ||
|
||
readonly ruby_path="$(rvm $PARAM_RUBY_VERSION 1> /dev/null 2> /dev/null && rvm env --path)" | ||
printf '%s\n' "source $ruby_path" >> $BASH_ENV |