Skip to content

Instantly share code, notes, and snippets.

@fojuth
Created October 26, 2016 07:13
Show Gist options
  • Select an option

  • Save fojuth/2541729ec23986115a4a7f8edda7cb7d to your computer and use it in GitHub Desktop.

Select an option

Save fojuth/2541729ec23986115a4a7f8edda7cb7d to your computer and use it in GitHub Desktop.
Run GrumPHP via Docker container instead of local env.
-- .git/hooks/pre-commit
(cd "./" && printf "%s\n" "${DIFF}" | docker-compose -f docker-compose.local.yml run api vendor/phpro/grumphp/bin/grumphp git:pre-commit --skip-success-output)
-- .git/hooks/commit-msg
(cd "./" && printf "%s\n" "${DIFF}" | docker-compose -f docker-compose.local.yml run api vendor/phpro/grumphp/bin/grumphp git:commit-msg "--git-user=$GIT_USER" "--git-email=$GIT_EMAIL" "$COMMIT_MSG_FILE")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment