Git pre-commit and pre-push actions
This commit is contained in:
7
.husky/pre-commit
Executable file
7
.husky/pre-commit
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
STAGED_CS=`git diff --cached --name-only --diff-filter=ACMR --pickaxe-regex "*.cs" | tr '\n' ';'`
|
||||
|
||||
dotnet husky run --group pre-commit --args $STAGED_CS
|
||||
|
||||
Reference in New Issue
Block a user