Skip to content

Commit

Permalink
Merge pull request #3 from Ig0r-M-magic42
Browse files Browse the repository at this point in the history
Use grumphp at least v0.18 and captainhook at least v5
  • Loading branch information
sebastianfeldmann authored May 19, 2020
2 parents 7f40a58 + a318c56 commit 7338057
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
.phpunit*
composer.lock
docs/coverage
grumphp.yml
grumphp.yml
.idea
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Your `captainhook.json` should afterwards cnotain the following sections:
"commit-msg" : {
"enabled" : true,
"actions" : [{
"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\"",
"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\"",
"options" : []
}]
}
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"php" : "^7.2|^8.0",
"ext-json" : "*",
"composer-plugin-api": "~1.0",
"phpro/grumphp": "^0.15.0",
"captainhook/captainhook": "^4.0"
"phpro/grumphp": "^0.18",
"captainhook/captainhook": "^5.0"
},
"require-dev": {
"composer/composer": "^1.8",
Expand Down
2 changes: 1 addition & 1 deletion src/Composer/GrumPHPAdder.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class GrumPHPAdder
];

const COMMIT_MSG_CONFIG = [
'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"',
'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"',
'options' => [],
];

Expand Down

0 comments on commit 7338057

Please sign in to comment.