diff --git a/.husky/pre-commit b/.husky/pre-commit index 3e37b04c..442a3afe 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,7 +1,11 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -pnpm build-json-examples -pnpm build-schema:dev +branch="$(git rev-parse --abbrev-ref HEAD)" +if [ "$branch" != "main" ]; then + pnpm build-json-examples + pnpm build-schema:dev +fi + pnpm check && pnpm fix git add .