summaryrefslogtreecommitdiff
path: root/scripts/gemfile_lock_changed.sh
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-26 18:09:24 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-26 18:09:24 +0000
commit619d0b6922a6cf95d291fbbf5fa3d09e772a1ea8 (patch)
treefb8f8e036cec1b32166206bb5102af6c5dca8cfe /scripts/gemfile_lock_changed.sh
parent17ab40ca089e1aef61a83f77ab6df62a72f6ce06 (diff)
downloadgitlab-ce-619d0b6922a6cf95d291fbbf5fa3d09e772a1ea8.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts/gemfile_lock_changed.sh')
-rwxr-xr-xscripts/gemfile_lock_changed.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/gemfile_lock_changed.sh b/scripts/gemfile_lock_changed.sh
new file mode 100755
index 00000000000..24e2c685f11
--- /dev/null
+++ b/scripts/gemfile_lock_changed.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+gemfile_lock_changed() {
+ if [ -n "$(git diff --name-only -- Gemfile.lock)" ]; then
+ cat << EOF
+ Gemfile was updated but Gemfile.lock was not updated.
+
+ Usually, when Gemfile is updated, you should run
+ \`\`\`
+ bundle install
+ \`\`\`
+
+ or
+
+ \`\`\`
+ bundle update <the-added-or-updated-gem>
+ \`\`\`
+
+ and commit the Gemfile.lock changes.
+EOF
+
+ exit 1
+ fi
+}
+
+gemfile_lock_changed