Skip to content

Commit

Permalink
Add bundler helpers docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
feelepxyz committed Sep 24, 2020
1 parent c4fed95 commit b463487
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 && \
Expand Down
17 changes: 17 additions & 0 deletions bundler/helpers/build
Original file line number Diff line number Diff line change
@@ -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"
6 changes: 2 additions & 4 deletions bundler/lib/dependabot/bundler/native_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b463487

Please sign in to comment.