Skip to content

Commit

Permalink
Fix rbenv support (#16)
Browse files Browse the repository at this point in the history
WIP
  • Loading branch information
mlarraz authored Sep 5, 2024
1 parent a8aa7be commit 84d958e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ function on_failure() {

function run_plugin() {
if [[ "${BUILDKITE_PLUGIN_TEST_SUMMARY_RUN_WITHOUT_DOCKER:-false}" = "true" ]]; then
PLUGIN_BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
[[ -n `which rbenv` ]] && rbenv shell $(cat $PLUGIN_BASEDIR/.ruby-version)
BUNDLE_GEMFILE="$PLUGIN_BASEDIR/Gemfile" "$PLUGIN_BASEDIR/bin/setup"
BUNDLE_GEMFILE="$PLUGIN_BASEDIR/Gemfile" bundler exec "$PLUGIN_BASEDIR/bin/run"
export PLUGIN_BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
export BUNDLE_GEMFILE="$PLUGIN_BASEDIR/Gemfile"
export RBENV_VERSION=$(cat $PLUGIN_BASEDIR/.ruby-version)
"$PLUGIN_BASEDIR/bin/setup"
bundle exec "$PLUGIN_BASEDIR/bin/run"
else
DOCKER_REPO="bugcrowd/test-summary-buildkite-plugin"
TAG=$(git describe --tags --exact-match 2> /dev/null || true)
Expand Down

0 comments on commit 84d958e

Please sign in to comment.