Skip to content

Instantly share code, notes, and snippets.

@koddsson
Created April 18, 2017 17:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koddsson/fa429cfc5c138e7636aab4c94c8a796f to your computer and use it in GitHub Desktop.
Save koddsson/fa429cfc5c138e7636aab4c94c8a796f to your computer and use it in GitHub Desktop.
#!/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"
}
check_run package.json "yarn"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment