Skip to content

Commit c964797

Browse files
committed
Unstall other bundler versions
1 parent efa2d4c commit c964797

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ install: true
55
script: "script/cibuild"
66

77
before_install:
8-
- gem uninstall --force bundler
9-
- gem install bundler -v 1.15.4
8+
- "script/travis-before-install"
109

1110
matrix:
1211
include:

script/travis-before-install

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
# Script runs before travis CI builds.
4+
5+
set -ex
6+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
7+
8+
cd "$DIR"
9+
DESIRED_BUNDLER_VERSION=$(grep "add_development_dependency 'bundler'" octocatalog-diff.gemspec | cut -d"'" -f4)
10+
gem install bundler -v "$DESIRED_BUNDLER_VERSION"
11+
12+
BUNDLER_VERSIONS=$(gem list bundler | grep ^bundler | cut -d'(' -f2 | cut -d')' -f1 | tr "," " ")
13+
for v in $BUNDLER_VERSIONS; do
14+
if [ "$v" != "$DESIRED_BUNDLER_VERSION" ]; then gem uninstall bundler --force -v "$v"; fi
15+
done

0 commit comments

Comments
 (0)