Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
#!/bin/sh
[ -n "$CI" ] && exit 0

echo "Running build and tests..."
yarn test && yarn build
# Check for skip checks via environment variable
# Usage:
# - Run with env var: SKIP_PUSH_HOOK=1 git push
if [ "$SKIP_PUSH_HOOK" = "1" ]; then
echo "Skipping build and tests..."
exit 0
else
echo "Running build and tests..."
yarn test && yarn build

if [ $? -ne 0 ]; then
echo "Build or tests failed. Please fix errors before pushing."
exit 1
if [ $? -ne 0 ]; then
echo "Build or tests failed. Please fix errors before pushing or use 'SKIP_PUSH_HOOK=1 git push' to skip."
exit 1
fi
fi