Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit ebbfb1b

Browse files
authored
Merge pull request #6 from SimonGolms/feature/git-hooks
feature/git-hooks
2 parents 72b60fc + 982a3d9 commit ebbfb1b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.husky/post-checkout

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
. "$(dirname -- "$0")/_/husky.sh"
33

44
set +e
5-
# Install any missing dependencies since package.json changed
6-
git diff-tree -r --name-only --no-commit-id "$1" "$2" | grep --quiet package.json && npm ci
5+
# Install any missing dependencies since package.json changed, while only versions changes are ignored.
6+
git diff-tree -r --ignore-matching-lines="version" --name-only --no-commit-id "$1" "$2" | grep --quiet package.json && npm ci
77
set -e

.husky/post-merge

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env sh
22
. "$(dirname -- "$0")/_/husky.sh"
33

4-
# Install any missing dependencies since package.json changed
5-
git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD | grep --quiet package.json && npm install
4+
# Install any missing dependencies since package.json changed, while only versions changes are ignored.
5+
git diff-tree -r --ignore-matching-lines="version" --name-only --no-commit-id ORIG_HEAD HEAD | grep --quiet package.json && npm ci

0 commit comments

Comments
 (0)