We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5515de3 + 2db19f4 commit b512a85Copy full SHA for b512a85
.husky/pre-push
@@ -1,10 +1,18 @@
1
#!/bin/sh
2
[ -n "$CI" ] && exit 0
3
4
-echo "Running build and tests..."
5
-yarn test && yarn build
+# Check for skip checks via environment variable
+# Usage:
6
+# - Run with env var: SKIP_PUSH_HOOK=1 git push
7
+if [ "$SKIP_PUSH_HOOK" = "1" ]; then
8
+ echo "Skipping build and tests..."
9
+ exit 0
10
+else
11
+ echo "Running build and tests..."
12
+ yarn test && yarn build
13
-if [ $? -ne 0 ]; then
- echo "Build or tests failed. Please fix errors before pushing."
- exit 1
14
+ if [ $? -ne 0 ]; then
15
+ echo "Build or tests failed. Please fix errors before pushing or use 'SKIP_PUSH_HOOK=1 git push' to skip."
16
+ exit 1
17
+ fi
18
fi
0 commit comments