Sha256: 553a5d47f4f72d08a22f2e932ea4120238f5cf9b0fb55fb47e484ab9a969cd39

Contents?: true

Size: 607 Bytes

Versions: 4

Compression:

Stored size: 607 Bytes

Contents

#!/usr/bin/env bash

set -o errexit
set -o pipefail
set -o nounset

rails_version="$(echo "$(basename $BUNDLE_GEMFILE .gemfile)" | sed 's/[^0-9.]*\([0-9.]*\).*/\1/')"

echo "Trying to compare rails ${rails_version} with 5.1"

if (( $(echo "${rails_version%.*} >= 5.1" |bc -l) )); then
   echo "Installing Bundler v2"
   gem uninstall -v '< 2.0' -i $(rvm gemdir)@global -ax bundler --force || true
   gem install bundler -v '2.0.1'
else
   echo "Installing Bundler v1"
   gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler --force  || true
   gem install bundler -v '1.17.3'
fi

unset rails_version

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
enhanced_date_select-1.5.2 install-travis-bundler.sh
enhanced_date_select-1.5.1 install-travis-bundler.sh
enhanced_date_select-1.5.0 install-travis-bundler.sh
washout_builder-1.7.4 install-travis-bundler.sh