Add lefthook rule for ensure existence of a gem checksum
Proposed solution
Add bundle-checksum lint
to check the existence of checksum. We did not reuse bundle-checksum verify
because it's slow. See #414374 (comment 1428414858)
Old Description
When we add a new gem into the monolith, we need to run bundle exec bundler-checksum init
to update the Gem.checksum file. Failing to do so will cause problems and a failure in the pipeline. This can be prevented by adding a lefhook rule which does the following
- If any gem is added/updated, verify the current state of Gemfile.lock and Gemfile.checksum are as expected by running
bundle exec bundler-checksum init
- If these files are not as expected, exit with a failure
Edited by Peter Leitzen