Created
October 15, 2019 11:06
-
-
Save ngryman/fa085849e6f5dbeefcd9208a784e4216 to your computer and use it in GitHub Desktop.
Pre-commit hook to detect dependencies changes in a monorepo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
has_package_changed=$(git diff --cached --quiet */package.json packages/*/package.json; echo $?) | |
if [ $has_package_changed = 1 ]; then | |
# do stuff | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment