From f8a892faf2112105ad808f05bd7582e672c41726 Mon Sep 17 00:00:00 2001 From: Rob Harrington Date: Thu, 9 Nov 2017 12:25:43 +1100 Subject: [PATCH] Remove upgrade_bundler script by reverting 250062bd2, 3f2299e52 and 5dfac10599 --- .travis.yml | 3 --- README.md | 1 - script/upgrade_bundler.sh | 29 ----------------------------- 3 files changed, 33 deletions(-) delete mode 100755 script/upgrade_bundler.sh diff --git a/.travis.yml b/.travis.yml index 3888593277..d932c1631c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/README.md b/README.md index c44337dca4..d887881713 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/script/upgrade_bundler.sh b/script/upgrade_bundler.sh deleted file mode 100755 index 3d62cd3c82..0000000000 --- a/script/upgrade_bundler.sh +++ /dev/null @@ -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