From bd7d0f1f6c8708512bd49793e5e288fd8cfeffe4 Mon Sep 17 00:00:00 2001 From: Roy Razon Date: Mon, 11 Dec 2023 14:58:51 +0200 Subject: [PATCH] fix pre-commit hook --- .husky/pre-commit | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index d6f71e76..e32e31b1 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,22 +1,22 @@ -#!/usr/bin/env sh +#!/usr/bin/env bash . "$(dirname -- "$0")/_/husky.sh" diff=$(git diff --cached --name-only) -if echo "${diff}" | grep --quiet '^site/'; then +if echo "${diff}" | grep -E --quiet '^site/'; then (cd site; yarn build) fi -if echo "${diff}" | grep --quiet '^(packages/)|(lerna)|(package.json)|(yarn.lock)'; then +if echo "${diff}" | grep -E --quiet '^(packages/)|(lerna)|(package.json)|(yarn.lock)'; then yarn yarn lint-staged yarn check-mismatches fi -if echo "${diff}" | grep --quiet '^tunnel-server/'; then +if echo "${diff}" | grep -E --quiet '^tunnel-server/'; then (cd tunnel-server; yarn lint && yarn build) fi -if echo "${diff}" | grep --quiet '^README/'; then +if echo "${diff}" | grep -E --quiet '^README/'; then npx awesome-lint fi