Skip to content

Commit

Permalink
🔧 add pre-merge
Browse files Browse the repository at this point in the history
  • Loading branch information
JiangWeixian committed Jun 24, 2023
1 parent 6e28f4f commit 8d01c2f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Empty file modified .husky/pre-commit
100644 → 100755
Empty file.
11 changes: 11 additions & 0 deletions .husky/pre-merge
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

check_run() {
if [ $(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD | grep -c "package.json") -gt 0 ]
then
pnpm install
fi
}

check_run

0 comments on commit 8d01c2f

Please sign in to comment.