Skip to content

Commit

Permalink
fix: test (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
imevanc authored Aug 30, 2024
1 parent 108bd23 commit 9ecacce
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
npm run test:type
npm run test:unit
npm run lint:fix
#!/bin/sh

# Get the current branch
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)

# Set the branch you want to skip
MAIN_BRANCH="main"

# Check if the current branch is different from main
if [ "$CURRENT_BRANCH" != "$MAIN_BRANCH" ]; then
echo "Running pre-commit hook on branch: $CURRENT_BRANCH"

# Add the commands or tools you want to run here
npm run test:type
npm run test:unit
npm run lint:fix
else
echo "Skipping pre-commit hook on the main branch"
fi

0 comments on commit 9ecacce

Please sign in to comment.