diff --git a/.husky/post-checkout b/.husky/post-checkout index 2cbb3d818..2ff91172d 100755 --- a/.husky/post-checkout +++ b/.husky/post-checkout @@ -1,4 +1,15 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -rm -rf *.tsbuildinfo */*.tsbuildinfo */*/*.tsbuildinfo */*/*/*.tsbuildinfo */*/*/*/*.tsbuildinfo \ No newline at end of file +set -e + +rm -rf *.tsbuildinfo */*.tsbuildinfo */*/*.tsbuildinfo */*/*/*.tsbuildinfo */*/*/*/*.tsbuildinfo + +# This notifies the user if the yarn.lock file has changed. +CHANGED=$(git diff "$1" "$2" --stat -- ./yarn.lock | wc -l) +if (( CHANGED > 0 )); then + echo + echo "🚨 🚨 🚨 yarn.lock has changed! 🚨 🚨 🚨 " + echo "run 'yarn' to get the latest!" + echo +fi diff --git a/.husky/post-merge b/.husky/post-merge new file mode 100644 index 000000000..d24df7600 --- /dev/null +++ b/.husky/post-merge @@ -0,0 +1,13 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +set -e + +# This notifies the user if the yarn.lock file has changed. +CHANGED=$(git diff HEAD@{1} --stat -- ./yarn.lock | wc -l) +if (( CHANGED > 0 )); then + echo + echo "🚨 🚨 🚨 yarn.lock has changed! 🚨 🚨 🚨 " + echo "run 'yarn' to get the latest!" + echo +fi