diff --git a/.gitignore b/.gitignore index 777a341178..3f57eee321 100644 --- a/.gitignore +++ b/.gitignore @@ -15,10 +15,11 @@ vendor /.vscode-server/ /.vscode-server-insiders/ .byebug_history -/terraform/helpers/install-dir -/go_modules/helpers/install-dir +/bundler/helpers/install-dir /npm_and_yarn/helpers/node_modules /npm_and_yarn/helpers/install-dir +/go_modules/helpers/install-dir +/terraform/helpers/install-dir /dry-run **/bin/helper /.core-bash_history diff --git a/Dockerfile b/Dockerfile index 20dd994e4f..dd171664a2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -170,6 +170,7 @@ RUN export CARGO_HOME=/opt/rust ; curl https://sh.rustup.rs -sSf | sh -s -- -y COPY composer/helpers /opt/composer/helpers COPY dep/helpers /opt/dep/helpers +COPY bundler/helpers /opt/bundler/helpers COPY go_modules/helpers /opt/go_modules/helpers COPY hex/helpers /opt/hex/helpers COPY npm_and_yarn/helpers /opt/npm_and_yarn/helpers @@ -183,6 +184,7 @@ ENV DEPENDABOT_NATIVE_HELPERS_PATH="/opt" \ RUN bash /opt/terraform/helpers/build /opt/terraform && \ bash /opt/python/helpers/build /opt/python && \ bash /opt/dep/helpers/build /opt/dep && \ + bash /opt/bundler/helpers/build /opt/bundler && \ bash /opt/go_modules/helpers/build /opt/go_modules && \ bash /opt/npm_and_yarn/helpers/build /opt/npm_and_yarn && \ bash /opt/hex/helpers/build /opt/hex && \ diff --git a/bundler/helpers/build b/bundler/helpers/build new file mode 100755 index 0000000000..be0d1f2d7b --- /dev/null +++ b/bundler/helpers/build @@ -0,0 +1,17 @@ +#!/bin/bash + +set -e + +install_dir=$1 +if [ -z "$install_dir" ]; then + echo "usage: $0 INSTALL_DIR" + exit 1 +fi + +helpers_dir="$(dirname "${BASH_SOURCE[0]}")" +cp -r \ + "$helpers_dir/lib" \ + "$helpers_dir/run.rb" \ + "$install_dir" + +cd "$install_dir" diff --git a/bundler/lib/dependabot/bundler/native_helpers.rb b/bundler/lib/dependabot/bundler/native_helpers.rb index 46f2257d8a..315fc55c42 100644 --- a/bundler/lib/dependabot/bundler/native_helpers.rb +++ b/bundler/lib/dependabot/bundler/native_helpers.rb @@ -8,10 +8,8 @@ def self.helper_path end def self.native_helpers_root - # TODO: Remove? - # - # helpers_root = ENV["DEPENDABOT_NATIVE_HELPERS_PATH"] - # return File.join(helpers_root, "npm_and_yarn") unless helpers_root.nil? + helpers_root = ENV["DEPENDABOT_NATIVE_HELPERS_PATH"] + return File.join(helpers_root, "bundler") unless helpers_root.nil? File.join(__dir__, "../../../helpers") end