Skip to content

Commit

Permalink
chore: move codegen-chains logic to pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
alanrsoares committed Aug 20, 2023
1 parent a0e9329 commit aa1574c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"


if [[ $(git diff --cached --name-only | grep -E 'registry/.+\.chain\.json') ]]; then
bun run scripts/codegen-chains.ts
git add .
git commit --no-verify -m "chore: update generated files"
fi

bunx pretty-quick --staged
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ bun run test
bun run scripts/codegen-chains.ts
# add & commit files to git without triggering husky
git add .
git commit --amend --no-edit --no-verify
git commit --no-verify -m "chore: update generated files"

0 comments on commit aa1574c

Please sign in to comment.