Update captain hook for windows

This commit is contained in:
crazywhalecc
2025-12-10 13:41:36 +08:00
parent 458af6ac78
commit dc05ad23c9

View File

@@ -1,44 +1,44 @@
{ {
"pre-push": { "pre-push": {
"enabled": true, "enabled": true,
"actions": [ "actions": [
{ {
"action": "composer analyse" "action": ".\\vendor\\bin\\phpstan analyse --memory-limit 300M"
} }
] ]
}, },
"pre-commit": { "pre-commit": {
"enabled": true, "enabled": true,
"actions": [ "actions": [
{ {
"action": ".\\vendor\\bin\\php-cs-fixer fix --config=.php-cs-fixer.php --dry-run --diff {$STAGED_FILES|of-type:php}", "action": ".\\vendor\\bin\\php-cs-fixer fix --config=.php-cs-fixer.php --dry-run --diff {$STAGED_FILES|of-type:php}",
"conditions": [ "conditions": [
{ {
"exec": "\\CaptainHook\\App\\Hook\\Condition\\FileStaged\\OfType", "exec": "\\CaptainHook\\App\\Hook\\Condition\\FileStaged\\OfType",
"args": ["php"] "args": ["php"]
} }
] ]
} }
] ]
}, },
"post-change": { "post-change": {
"enabled": true, "enabled": true,
"actions": [ "actions": [
{ {
"action": "composer install", "action": "composer install",
"options": [], "options": [],
"conditions": [ "conditions": [
{ {
"exec": "\\CaptainHook\\App\\Hook\\Condition\\FileChanged\\Any", "exec": "\\CaptainHook\\App\\Hook\\Condition\\FileChanged\\Any",
"args": [ "args": [
[ [
"composer.json", "composer.json",
"composer.lock" "composer.lock"
] ]
] ]
} }
] ]
} }
] ]
} }
} }