Skip to content

Commit 7338057

Browse files
Merge pull request #3 from Ig0r-M-magic42
Use grumphp at least v0.18 and captainhook at least v5
2 parents 7f40a58 + a318c56 commit 7338057

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
.phpunit*
33
composer.lock
44
docs/coverage
5-
grumphp.yml
5+
grumphp.yml
6+
.idea

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Your `captainhook.json` should afterwards cnotain the following sections:
2727
"commit-msg" : {
2828
"enabled" : true,
2929
"actions" : [{
30-
"action" : "GIT_USER=$(git config user.name);GIT_EMAIL=$(git config user.email);COMMIT_MSG_FILE={FILE};DIFF=$(git -c diff.mnemonicprefix=false --no-pager diff -r -p -m -M --full-index --no-color --staged | cat);printf \"%s\n\" \"${DIFF}\" | exec ./vendor/bin/grumphp git:commit-msg \"--git-user=$GIT_USER\" \"--git-email=$GIT_EMAIL\" \"$COMMIT_MSG_FILE\"",
30+
"action" : "GIT_USER=$(git config user.name);GIT_EMAIL=$(git config user.email);COMMIT_MSG_FILE={$FILE};DIFF=$(git -c diff.mnemonicprefix=false --no-pager diff -r -p -m -M --full-index --no-color --staged | cat);printf \"%s\n\" \"${DIFF}\" | exec ./vendor/bin/grumphp git:commit-msg \"--git-user=$GIT_USER\" \"--git-email=$GIT_EMAIL\" \"$COMMIT_MSG_FILE\"",
3131
"options" : []
3232
}]
3333
}

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
"php" : "^7.2|^8.0",
1818
"ext-json" : "*",
1919
"composer-plugin-api": "~1.0",
20-
"phpro/grumphp": "^0.15.0",
21-
"captainhook/captainhook": "^4.0"
20+
"phpro/grumphp": "^0.18",
21+
"captainhook/captainhook": "^5.0"
2222
},
2323
"require-dev": {
2424
"composer/composer": "^1.8",

src/Composer/GrumPHPAdder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class GrumPHPAdder
2525
];
2626

2727
const COMMIT_MSG_CONFIG = [
28-
'action' => 'GIT_USER=$(git config user.name);GIT_EMAIL=$(git config user.email);COMMIT_MSG_FILE={FILE};DIFF=$(git -c diff.mnemonicprefix=false --no-pager diff -r -p -m -M --full-index --no-color --staged | cat);printf "%s\n" "${DIFF}" | exec ./vendor/bin/grumphp git:commit-msg "--git-user=$GIT_USER" "--git-email=$GIT_EMAIL" "$COMMIT_MSG_FILE"',
28+
'action' => 'GIT_USER=$(git config user.name);GIT_EMAIL=$(git config user.email);COMMIT_MSG_FILE={$FILE};DIFF=$(git -c diff.mnemonicprefix=false --no-pager diff -r -p -m -M --full-index --no-color --staged | cat);printf "%s\n" "${DIFF}" | exec ./vendor/bin/grumphp git:commit-msg "--git-user=$GIT_USER" "--git-email=$GIT_EMAIL" "$COMMIT_MSG_FILE"',
2929
'options' => [],
3030
];
3131

0 commit comments

Comments
 (0)