Remove upgrade_bundler script by reverting 250062bd2, 3f2299e52 and 5dfac10599

This commit is contained in:
Rob Harrington
2017-11-09 12:25:43 +11:00
committed by Rob H
parent 54e141489a
commit e6d1b38b82
3 changed files with 0 additions and 33 deletions

View File

@@ -22,9 +22,6 @@ env:
- CI_NODE_INDEX=3
- CI_NODE_INDEX=4 KARMA="true" GITHUB_DEPLOY="true"
before_install:
- ./script/upgrade_bundler.sh
before_script:
- cp config/database.travis.yml config/database.yml
- cp config/application.yml.example config/application.yml

View File

@@ -54,7 +54,6 @@ First, check your dependencies: Ensure that you have Ruby 2.1.5 installed:
Install the project's gem dependencies:
cd openfoodnetwork
./script/upgrade_bundler.sh
bundle install
Configure the site:

View File

@@ -1,29 +0,0 @@
#!/bin/sh
# This shell script looks for the last used Bundler version in Gemfile.lock and
# installs exactly that version, removing other versions.
# Fail if a single command fails.
set -e
# `grep -m 1`: find the first occurrence of "BUNDLED WITH"
# `-A`: print the next line after "BUNDLED WITH" as well
# `-x -F`: find exactly that string without interpreting regex
# `tail -n 1`: take the last line, the version line
# `tr -d`: delete all spaces, the indent before the version
version="$(grep -m 1 -A 1 -x -F "BUNDLED WITH" Gemfile.lock | tail -n 1 | tr -d '[:space:]')"
if [ -z "$version" ]; then
echo "No bundler version in Gemfile.lock."
exit 1
fi
current="$(bundler --version)"
if [ "$current" = "Bundler version $version" ]; then
echo "Already up-to-date: $current"
exit 0
fi
gem install bundler -v "$version"
gem cleanup bundler