Evan You
8 years ago
5 changed files with 22 additions and 8 deletions
@ -0,0 +1,8 @@ |
|||
const { test, ln, chmod } = require('shelljs') |
|||
|
|||
if (test('-e', '.git/hooks')) { |
|||
ln('-sf', '../../build/git-hooks/pre-commit', '.git/hooks/pre-commit') |
|||
chmod('+x', '.git/hooks/pre-commit') |
|||
ln('-sf', '../../build/git-hooks/commit-msg', '.git/hooks/commit-msg') |
|||
chmod('+x', '.git/hooks/commit-msg') |
|||
} |
@ -1,6 +0,0 @@ |
|||
#!/usr/bin/env bash |
|||
|
|||
if test -e .git/hooks; then |
|||
ln -sf ../../build/git-hooks/pre-commit .git/hooks/pre-commit && chmod +x .git/hooks/pre-commit |
|||
ln -sf ../../build/git-hooks/commit-msg .git/hooks/commit-msg && chmod +x .git/hooks/commit-msg |
|||
fi |
Loading…
Reference in new issue