Created
September 9, 2020 06:31
-
-
Save ksimons/6d573419f0741f2ad360be88b7a5c9ea to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
# fork from https://gist.github.com/jakemhiller/d342ad51505addf78ec628a16fd3280f | |
changed_files="$(git diff-tree -r --name-only --no-commit-id $1 $2)" | |
check_run() { | |
echo "$changed_files" | grep --quiet "$1" && eval "$2" | |
} | |
U=${USER+", $USER"} | |
check_run package.json "echo Hi there${U}. Looks like package.json was updated. You might want to consider calling \'yarn\'" | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment