summaryrefslogtreecommitdiff
path: root/scripts
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
parent17ab40ca089e1aef61a83f77ab6df62a72f6ce06 (diff)
downloadgitlab-ce-619d0b6922a6cf95d291fbbf5fa3d09e772a1ea8.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/gemfile_lock_changed.sh26
-rwxr-xr-xscripts/static-analysis3
2 files changed, 28 insertions, 1 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
diff --git a/scripts/static-analysis b/scripts/static-analysis
index 1f55c035ed1..251462fad33 100755
--- a/scripts/static-analysis
+++ b/scripts/static-analysis
@@ -49,7 +49,8 @@ def jobs_to_run(node_index, node_total)
%w[scripts/lint-conflicts.sh],
%w[scripts/lint-rugged],
%w[scripts/frontend/check_no_partial_karma_jest.sh],
- %w[scripts/lint-changelog-filenames]
+ %w[scripts/lint-changelog-filenames],
+ %w[scripts/gemfile_lock_changed.sh]
]
case node_total