Skip to content

Commit

Permalink
chore: pre-push - .next 파일 제거하도록
Browse files Browse the repository at this point in the history
  • Loading branch information
Doeunnkimm committed Sep 7, 2024
1 parent b114904 commit 31ec498
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

# apps 폴더에 변경사항이 있는지 확인
if git diff --cached --name-only | grep '^apps/' > /dev/null; then
# apps 폴더에 변경사항이 있을 때만 .next 디렉터리 삭제
echo "apps 폴더에 변경사항이 있습니다. 🗑️ .next 디렉터리를 삭제합니다."
find . -type d -name ".next" -exec rm -rf {} +
else
echo "apps 폴더에 변경사항이 없습니다. 💨 .next 디렉터리를 삭제를 넘어갑니다."
fi

pnpm run lint
pnpm run type-check
pnpm run build

0 comments on commit 31ec498

Please sign in to comment.