Skip to content

Commit

Permalink
chore(husky): add post-merge
Browse files Browse the repository at this point in the history
pnpm install automatically after git pull
  • Loading branch information
Faelayis committed Aug 13, 2023
1 parent 97a394f commit 7ad7ddf
Show file tree
Hide file tree
Showing 3 changed files with 6,361 additions and 6,305 deletions.
14 changes: 14 additions & 0 deletions .husky/post-merge
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

echo "→ husky (post-merge)"

if [ $(pnpm -v) ]; then
if [ $(pnpm git-pull-run -V) ]; then
pnpm git-pull-run --pattern "**/pnpm-lock.yaml" --command "pnpm install"
else
pnpx git-pull-run --pattern "**/pnpm-lock.yaml" --command "pnpm install"
fi
else
echo "❌ This project use pnpm." && exit 127
fi
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"eslint-plugin-simple-import-sort": "10.0.0",
"eslint-plugin-typescript-sort-keys": "2.3.0",
"eslint-plugin-unicorn": "48.0.1",
"git-pull-run": "1.4.0",
"husky": "8.0.3",
"lint-staged": "13.2.3",
"open-cli": "7.2.0",
Expand Down
Loading

0 comments on commit 7ad7ddf

Please sign in to comment.