-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce Husky git hook manager (#37)
* Introduce Husky git hook manager * Fix Tilt download URL --------- Co-authored-by: Richard Kovacs <[email protected]>
- Loading branch information
Showing
3 changed files
with
33 additions
and
1 deletion.
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,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
$PWD/bin/husky 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,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [[ "$SKIP_GIT_PUSH_HOOK" ]]; then exit 0; fi | ||
|
||
set -e | ||
|
||
if git status --short | grep -qv "??"; then | ||
git stash | ||
function unstash() { | ||
git reset --hard | ||
git stash pop | ||
} | ||
trap unstash EXIT | ||
fi | ||
|
||
make generate manifests | ||
git diff --exit-code --quiet || (git status && exit 1) | ||
|
||
make test |
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