Skip to content

Commit

Permalink
fix git hooks init
Browse files Browse the repository at this point in the history
  • Loading branch information
Chemaclass committed Oct 22, 2023
1 parent 3241db0 commit 344c442
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/CONTRIBUTING.md
Expand Up @@ -133,3 +133,5 @@ composer test-all # clear cache, php-cs-fixer, psalm, phpstan, compiler & c
### Git Hooks

Enable the git hooks with `tools/git-hooks/init.sh`

This will help you to trigger all tests before a commit, to make sure you didn't break any existing behaviour. You can use `-n|--no-verify` flag when doing a commit to avoid running the tests, but be aware that you should run `composer test` before pushing something that could be broken.
2 changes: 1 addition & 1 deletion tools/git-hooks/init.sh
Expand Up @@ -5,7 +5,7 @@ set -e
function setup_git_hooks()
{
echo "Initialising git hooks..."
ln -sf "$PWD/.github/git-hooks/pre-commit.sh" "$PWD/.git/hooks/pre-commit"
ln -sf "$PWD/tools/git-hooks/pre-commit.sh" "$PWD/.git/hooks/pre-commit"
echo "Done"
}

Expand Down

0 comments on commit 344c442

Please sign in to comment.