Skip to content

Commit 6180085

Browse files
committed
Wrap 'bundle' to run proper version
1 parent f7914d1 commit 6180085

File tree

4 files changed

+13
-17
lines changed

4 files changed

+13
-17
lines changed

script/bootstrap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ set +e
1414
echo 'Running bundler'
1515
cd "${DIR}" && \
1616
rm -f Gemfile.lock && \
17-
bundle install --without='' --no-prune --path vendor/bundle --local && \
18-
bundle binstubs puppet rake rspec-core rubocop parallel_tests && \
17+
"$DIR/script/bundle" install --without='' --no-prune --path vendor/bundle --local && \
18+
"$DIR/script/bundle" binstubs puppet rake rspec-core rubocop parallel_tests && \
1919
chmod 0755 bin/octocatalog-diff
2020
if [ $? -ne 0 ]; then
2121
echo 'bundle install failed - aborting bootstrap'

script/bundle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
# Wrap "bundle" as it's used in the CI build scripts.
4+
set -e
5+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
6+
cd "$DIR"
7+
DESIRED_BUNDLER_VERSION=$(grep "add_development_dependency 'bundler'" octocatalog-diff.gemspec | cut -d"'" -f4)
8+
bundle "_${DESIRED_BUNDLER_VERSION}_" "$@"

script/cibuild

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ if [ "$RUBOCOP_TEST" = "true" ]; then
4949
echo ""
5050

5151
bootstrap
52-
time bundle exec rake rubocop
52+
time "$DIR/script/bundle" exec rake rubocop
5353
RUBOCOP_EXITCODE=$?
5454
echo ""
5555
else
@@ -90,7 +90,7 @@ if [ "$RSPEC_TEST" = "true" ]; then
9090

9191
# Run the tests
9292
echo "Running tests"
93-
time bundle exec rake test
93+
time "$DIR/script/bundle" exec rake test
9494
exitcode=$?
9595
if [ "$exitcode" -ne 0 ]; then RSPEC_EXITCODE="$exitcode"; fi
9696
cat "$OUTPUT_FILE"

script/travis-before-install

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,7 @@
11
#!/bin/bash
22

3-
# Script runs before travis CI builds.
4-
5-
echo "travis_fold:start:travis-before-install"
6-
set -ex
3+
set -e
74
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
8-
95
cd "$DIR"
106
DESIRED_BUNDLER_VERSION=$(grep "add_development_dependency 'bundler'" octocatalog-diff.gemspec | cut -d"'" -f4)
117
gem install bundler -v "$DESIRED_BUNDLER_VERSION"
12-
13-
BUNDLER_VERSIONS=$(gem list bundler | grep ^bundler | cut -d'(' -f2 | cut -d')' -f1 | tr "," " ")
14-
for v in $BUNDLER_VERSIONS; do
15-
if [ "$v" != "$DESIRED_BUNDLER_VERSION" ]; then
16-
gem uninstall bundler --force -v "$v" || true
17-
fi
18-
done
19-
echo "travis_fold:end:travis-before-install"

0 commit comments

Comments
 (0)