Welcome to mirror list, hosted at ThFree Co, Russian Federation.

rails4-gemfile-lock-check « scripts - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a74a49874e151ec22fb387524df8d64f36293ca9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env bash

echo -e "=> Checking if Gemfile.rails4.lock is up-to-date...\\n"

cp Gemfile.rails4.lock Gemfile.rails4.lock.orig
BUNDLE_GEMFILE=Gemfile.rails4 bundle install "$BUNDLE_INSTALL_FLAGS"
diff -u Gemfile.rails4.lock.orig Gemfile.rails4.lock >/dev/null 2>&1

if [ $? == 1 ]
then
  diff -u Gemfile.rails4.lock.orig Gemfile.rails4.lock

  echo -e "\\n✖ ERROR: Gemfile.rails4.lock is not up-to-date!
         Please run 'BUNDLE_GEMFILE=Gemfile.rails4 bundle install'\\n" >&2
  exit 1
fi

echo "✔ Gemfile.rails4.lock is up-to-date"
exit 0