This repository has been archived by the owner on Apr 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from LiskHQ/46_review-tests-in-travis
Review tests in travis - Closes #46
- Loading branch information
Showing
5 changed files
with
28 additions
and
7 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
# MIT © Sindre Sorhus - sindresorhus.com | ||
|
||
# git hook to run a command after `git pull` if a specified file was changed | ||
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | ||
|
||
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | ||
|
||
check_run() { | ||
echo "$changed_files" | grep --quiet "$1" && eval "$2" | ||
} | ||
|
||
# Example usage | ||
# In this example it's used to run `npm install` if package.json changed | ||
check_run src/package.json "cd src && npm install" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
cd src | ||
npm run test | ||
|
||
exit $? |
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
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
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