Skip to content

Commit

Permalink
don't run extra precommit steps if branch is main
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamcinchak committed Mar 5, 2024
1 parent d2c7b4d commit e024081
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -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 .

0 comments on commit e024081

Please sign in to comment.