Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1627 from mssola/rvm-travis
Browse files Browse the repository at this point in the history
packaging: manually set the bundler version
  • Loading branch information
mssola authored Jan 25, 2018
2 parents f8b07f4 + 013ce72 commit 98d86aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
7 changes: 0 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@ cache:
- $PWD/travis_phantomjs

before_install:
# Remove the default bundler and install the expected one.
- rvm @global do gem uninstall bundler --all --executables
- gem uninstall bundler --all --executables
- gem install bundler --version '1.16.0'
- rvm reload
- bundle --version

- phantomjs --version
- export PATH=$PWD/travis_phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH
- if [ $(phantomjs --version) != '2.1.1' ]; then rm -rf $PWD/travis_phantomjs; mkdir -p $PWD/travis_phantomjs; fi
Expand Down
12 changes: 6 additions & 6 deletions packaging/suse/make_spec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ fi

packagename=$1

bundler_version=$(bundle version 2>/dev/null | awk '{ print $3 }')
if [ "$bundler_version" != "$BUNDLER_VERSION" ];then
error "Bundler $BUNDLER_VERSION required!"
fi

cd $(dirname $0)

if [ $TRAVIS_BRANCH ];then
Expand Down Expand Up @@ -117,7 +112,12 @@ pushd build/$packagename-$branch/
# with tr. This way, fetching the name and version is as easy as awk'ing again.
for gem in $(bundle show | tail -n +2 | awk '{ print $2 " " $3 }' | tr -d '()');do
gem_name=$(echo $gem | awk '{ print $1 }')
gem_version=$(echo $gem | awk '{ print $2 }')
if [[ "$gem_name" == "bundler" ]]; then
gem_version="$BUNDLER_VERSION"
else
gem_version=$(echo $gem | awk '{ print $2 }')
fi

build_requires="$build_requires\nBuildRequires: %{rubygem $gem_name} = $gem_version"
build_requires="$build_requires$(additional_native_build_requirements $gem_name)"
done
Expand Down

0 comments on commit 98d86aa

Please sign in to comment.