diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-26 18:09:24 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-26 18:09:24 +0000 |
commit | 619d0b6922a6cf95d291fbbf5fa3d09e772a1ea8 (patch) | |
tree | fb8f8e036cec1b32166206bb5102af6c5dca8cfe /scripts/gemfile_lock_changed.sh | |
parent | 17ab40ca089e1aef61a83f77ab6df62a72f6ce06 (diff) | |
download | gitlab-ce-619d0b6922a6cf95d291fbbf5fa3d09e772a1ea8.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts/gemfile_lock_changed.sh')
-rwxr-xr-x | scripts/gemfile_lock_changed.sh | 26 |
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 |