Skip to content

Commit 79c61bf

Browse files
committed
devxp: auto-run 'bundle install' when Gemfile, Gemfile.lock, or version.rb change; stage updated Gemfile.lock in pre-commit
1 parent 44227df commit 79c61bf

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

lefthook.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,16 @@ pre-commit:
4040
- group:
4141
parallel: false
4242
jobs:
43+
- name: bundle-install
44+
glob: '{Gemfile,Gemfile.lock,lib/log_struct/version.rb}'
45+
run: |
46+
echo "Detected Gemfile/version change; running bundle install..."
47+
bundle install
48+
if [[ -f Gemfile.lock ]]; then
49+
git add Gemfile.lock
50+
fi
51+
stage_fixed: true
52+
4353
- name: fix-whitespace
4454
run: |
4555
for file in {staged_files}; do

0 commit comments

Comments
 (0)