Skip to content

Commit

Permalink
Merge pull request #11 from PezhmanGhavami/enhance/husky-update
Browse files Browse the repository at this point in the history
enhance/updated husky
  • Loading branch information
PezhmanGhavami authored Aug 22, 2024
2 parents e647460 + c1de0ac commit 7afc24e
Show file tree
Hide file tree
Showing 5 changed files with 191 additions and 74 deletions.
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

branch="$(git rev-parse --abbrev-ref HEAD)"

if [ "$branch" = "main" ]; then
Expand Down
10 changes: 10 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
branch="$(git rev-parse --abbrev-ref HEAD)"

if [ "$branch" = "main" ]; then
echo "Pushing to main branch is not allowed 😜"
exit 1
fi

echo 'Building the project ⏳'

npx next build
Loading

0 comments on commit 7afc24e

Please sign in to comment.