Skip to content

Commit

Permalink
chore: install auto
Browse files Browse the repository at this point in the history
  • Loading branch information
hasparus committed Mar 1, 2021
1 parent 4b4e8f5 commit 93c4b4e
Show file tree
Hide file tree
Showing 3 changed files with 579 additions and 26 deletions.
30 changes: 30 additions & 0 deletions .husky/_/husky.sh
@@ -0,0 +1,30 @@
#!/bin/sh
if [ -z "$husky_skip_init" ]; then
debug () {
[ "$HUSKY_DEBUG" = "1" ] && echo "husky (debug) - $1"
}

readonly hook_name="$(basename "$0")"
debug "starting $hook_name..."

if [ "$HUSKY" = "0" ]; then
debug "HUSKY env variable is set to 0, skipping hook"
exit 0
fi

if [ -f ~/.huskyrc ]; then
debug "sourcing ~/.huskyrc"
. ~/.huskyrc
fi

export readonly husky_skip_init=1
sh -e "$0" "$@"
exitCode="$?"

if [ $exitCode != 0 ]; then
echo "husky - $hook_name hook exited with code $exitCode (error)"
exit $exitCode
fi

exit 0
fi
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -35,6 +35,7 @@
"@types/jest": "^26.0.10",
"@types/react-dom": "^17.0.0",
"@types/react-test-renderer": "^17.0.0",
"auto": "^10.16.8",
"babel-jest": "^26.0.1",
"babel-preset-gatsby": "^0.12.1",
"husky": ">=4.0.7",
Expand Down

0 comments on commit 93c4b4e

Please sign in to comment.