Sha256: 405c72e3227e3afe90f4ce385b56ad6edfd5247cf5262aae4d63600bb13988b2
Contents?: true
Size: 712 Bytes
Versions: 4
Compression:
Stored size: 712 Bytes
Contents
#!/usr/bin/env bash # set -o errexit # set -o pipefail # set -o nounset rails_version="$(basename "${BUNDLE_GEMFILE:="$(pwd)/Gemfile"}" .gemfile | sed 's/[^0-9.]*\([0-9.]*\).*/\1/')" echo "Trying to compare rails ${rails_version:="1"} with 5.2" if (( $(echo "${rails_version%.*} >= 5.2" |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' export MY_BUNDLER_VERSION="_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' export MY_BUNDLER_VERSION="_1.17.3_" fi unset rails_version
Version data entries
4 entries across 4 versions & 1 rubygems