Don't run any git hooks unless env variable is set

MAILPOET-4237
This commit is contained in:
John Oleksowicz
2024-01-12 13:00:58 -06:00
committed by John Oleksowicz
parent bc4014d4a3
commit 7b64c47733
4 changed files with 11 additions and 1 deletions

View File

@@ -1,5 +1,7 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
. "$(dirname "$0")/common.sh"
. "$(dirname "$0")/../mailpoet/.env"
[ "$MP_GIT_HOOKS_ENABLE" != "true" ] && exit 0
. "$(dirname "$0")/common.sh"
installIfUpdates

View File

@@ -1,5 +1,8 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
. "$(dirname "$0")/../mailpoet/.env"
[ "$MP_GIT_HOOKS_ENABLE" != "true" ] && exit 0
. "$(dirname "$0")/common.sh"
installIfUpdates

View File

@@ -1,5 +1,8 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
. "$(dirname "$0")/../mailpoet/.env"
[ "$MP_GIT_HOOKS_ENABLE" != "true" ] && exit 0
. "$(dirname "$0")/common.sh"
installIfUpdates

View File

@@ -1,5 +1,7 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
. "$(dirname "$0")/../mailpoet/.env"
[ "$MP_GIT_HOOKS_ENABLE" != "true" ] && exit 0
npx lint-staged -c mailpoet/package.json --cwd mailpoet
npx lint-staged -c package.json