5679837cd4
Signed-off-by: Rémy Coutable <remy@rymai.me>
15 lines
614 B
Ruby
15 lines
614 B
Ruby
# rubocop:disable Style/SignalException
|
|
|
|
gemfile_modified = git.modified_files.include?("Gemfile")
|
|
gemfile_lock_modified = git.modified_files.include?("Gemfile.lock")
|
|
|
|
if gemfile_modified && !gemfile_lock_modified
|
|
msg = [
|
|
"#{gitlab.html_link("Gemfile")} was edited but #{gitlab.html_link("Gemfile.lock")} wasn't.",
|
|
"Usually, when #{gitlab.html_link("Gemfile")} is updated, you should run",
|
|
"`bundle install && BUNDLE_GEMFILE=Gemfile.rails5 bundle install` or",
|
|
"`bundle update <the-added-or-updated-gem>` and commit the #{gitlab.html_link("Gemfile.lock")} changes."
|
|
]
|
|
|
|
warn msg.join(" ")
|
|
end
|