Skip to content

Commit

Permalink
[ENV][Fix] : Husky 버그 수정 및 동작 파일 업로드
Browse files Browse the repository at this point in the history
  • Loading branch information
effozen committed Nov 5, 2024
1 parent 34b4cad commit c4cc835
Show file tree
Hide file tree
Showing 19 changed files with 78 additions and 17 deletions.
1 change: 1 addition & 0 deletions .husky/_/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*
2 changes: 2 additions & 0 deletions .husky/_/applypatch-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "$(dirname "$0")/h"
2 changes: 2 additions & 0 deletions .husky/_/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "$(dirname "$0")/h"
22 changes: 22 additions & 0 deletions .husky/_/h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env sh
[ "$HUSKY" = "2" ] && set -x
n=$(basename "$0")
s=$(dirname "$(dirname "$0")")/$n

[ ! -f "$s" ] && exit 0

if [ -f "$HOME/.huskyrc" ]; then
echo "husky - '~/.huskyrc' is DEPRECATED, please move your code to ~/.config/husky/init.sh"
fi
i="${XDG_CONFIG_HOME:-$HOME/.config}/husky/init.sh"
[ -f "$i" ] && . "$i"

[ "${HUSKY-}" = "0" ] && exit 0

export PATH="node_modules/.bin:$PATH"
sh -e "$s" "$@"
c=$?

[ $c != 0 ] && echo "husky - $n script failed (code $c)"
[ $c = 127 ] && echo "husky - command not found in PATH=$PATH"
exit $c
9 changes: 9 additions & 0 deletions .husky/_/husky.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
echo "husky - DEPRECATED
Please remove the following two lines from $0:
#!/usr/bin/env sh
. \"\$(dirname -- \"\$0\")/_/husky.sh\"
They WILL FAIL in v10.0.0
"
2 changes: 2 additions & 0 deletions .husky/_/post-applypatch
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "$(dirname "$0")/h"
2 changes: 2 additions & 0 deletions .husky/_/post-checkout
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "$(dirname "$0")/h"
2 changes: 2 additions & 0 deletions .husky/_/post-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "$(dirname "$0")/h"
2 changes: 2 additions & 0 deletions .husky/_/post-merge
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "$(dirname "$0")/h"
2 changes: 2 additions & 0 deletions .husky/_/post-rewrite
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "$(dirname "$0")/h"
2 changes: 2 additions & 0 deletions .husky/_/pre-applypatch
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "$(dirname "$0")/h"
2 changes: 2 additions & 0 deletions .husky/_/pre-auto-gc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "$(dirname "$0")/h"
2 changes: 2 additions & 0 deletions .husky/_/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "$(dirname "$0")/h"
2 changes: 2 additions & 0 deletions .husky/_/pre-merge-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "$(dirname "$0")/h"
2 changes: 2 additions & 0 deletions .husky/_/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "$(dirname "$0")/h"
2 changes: 2 additions & 0 deletions .husky/_/pre-rebase
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "$(dirname "$0")/h"
2 changes: 2 additions & 0 deletions .husky/_/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "$(dirname "$0")/h"
34 changes: 17 additions & 17 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
echo "🔍 commit 이전에 lint 규칙을 적용합니다..."
if pnpm lint-staged; then
echo "✅ 모든 lint 규칙이 성공적으로 적용되었습니다."
exit 0
else
echo "❌ lint 규칙 검사에서 오류가 발생했습니다."
exit 1
fi
echo "🔍 commit 이전에 test를 실행합니다..."
if pnpm test; then
echo "✅ 모든 Test를 통과하셨습니다."
exit 0
else
echo "❌ Test를 통과하지 못했습니다."
exit 1
fi
echo "🔍 commit 이전에 lint 규칙을 적용합니다..."
if pnpm lint-staged; then
echo "✅ 모든 lint 규칙이 성공적으로 적용되었습니다."
exit 0
else
echo "❌ lint 규칙 검사에서 오류가 발생했습니다."
exit 1
fi

echo "🔍 commit 이전에 test를 실행합니다..."
if pnpm test; then
echo "✅ 모든 Test를 통과하셨습니다."
exit 0
else
echo "❌ Test를 통과하지 못했습니다."
exit 1
fi
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"private": true,
"description": "중장년층을 위한 접근성을 바탕으로 한 위치 기반 서비스",
"scripts": {
"prepare": "husky",
"front": "pnpm --filter ddara-frontend dev",
"backend": "pnpm --filter ddara-backend dev",
"build": "pnpm --filter ddara-frontend build",
Expand Down

0 comments on commit c4cc835

Please sign in to comment.