mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
feat: add git hook to auto update dependencies (#3365)
* feat: add git hook to auto update dependencies * feat: update color
This commit is contained in:
parent
1c1fd39d37
commit
5ac433a905
5
.husky/post-merge
Executable file
5
.husky/post-merge
Executable file
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env sh
|
||||
huskyDir=$(dirname -- "$0")
|
||||
. "$huskyDir/_/husky.sh"
|
||||
|
||||
. "$huskyDir/scripts/update-dep"
|
||||
5
.husky/post-rebase
Executable file
5
.husky/post-rebase
Executable file
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env sh
|
||||
huskyDir=$(dirname -- "$0")
|
||||
. "$huskyDir/_/husky.sh"
|
||||
|
||||
. "$huskyDir/scripts/update-dep"
|
||||
11
.husky/scripts/update-dep
Normal file
11
.husky/scripts/update-dep
Normal file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env sh
|
||||
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
|
||||
|
||||
check_run() {
|
||||
if (echo "$changed_files" | grep --quiet "$1"); then
|
||||
printf "\033[36mDetected changes in pnpm-lock.yaml, starting dependency update\033[0m\n"
|
||||
eval "$2"
|
||||
fi
|
||||
}
|
||||
|
||||
check_run pnpm-lock.yaml "pnpm install --color"
|
||||
Loading…
x
Reference in New Issue
Block a user