From 69a9c7e75fc29c762a9c383f152e6ae412c4aa6f Mon Sep 17 00:00:00 2001 From: Albert Date: Sat, 12 Oct 2024 14:55:10 +0800 Subject: [PATCH] feat: update pre-commit --- .husky/pre-commit | 3 +++ package.json | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index ad2b04f..a745de6 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -12,3 +12,6 @@ yarn solhint # unit test echo "Running test" yarn test + +echo "Running pre-commit" +yarn pre-commit diff --git a/package.json b/package.json index d5ebbb4..56d4181 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "upgradeable": "make upgradeable", "mythril": "make mythril", "storage-layout": "make storage-layout", - "prepare": "husky install" + "prepare": "husky install", + "pre-commit": "yarn abi && git diff --cached --name-only --diff-filter=ACM | grep -E '\\.abi\\.json$' | xargs -r git add" } }