Skip to content

Releases: BrainMaestro/composer-git-hooks

Support newer versions of symfony/console

22 Jun 09:22
Compare
Choose a tag to compare

Revert Concatenate Commands

08 Feb 16:03
Compare
Choose a tag to compare

The previous release had issues with hook definitions that did not have a command per line. Reverted for now, and will be revised later

Concatenate commands

26 Jan 14:50
Compare
Choose a tag to compare

When generating a new hook, the commands are now concatenated with && to ensure that the each command is only executed if the preceding one returns a success (0) status code

Support older versions of `git`

17 Oct 11:16
Compare
Choose a tag to compare
  • Older versions of git did not understand the git rev-parse --git-common-dir used to resolve the git dir, so a fallback was introduced.
  • The --ignore-lock modification was fixed, so there should be no issues for newcomers to an existing project anymore.

Thanks to @devnix for pointing out these issues!

Remove hard dependency on git

02 Sep 15:47
Compare
Choose a tag to compare
  • git is now only invoked to resolve the git-dir if a --git-dir is not provided
  • --lock-dir was added which resolves to the current working directory if not provided

Add worktree and composer dev mode support

09 Jun 11:03
Compare
Choose a tag to compare
  • Running cghooks in a git worktree now correctly resolves the .git folder.
  • cghooks is now aware of composer dev mode, and will not add or update hooks if run in production mode (--no-dev). This feature was REVERTED

Add global git hook support

28 Oct 03:02
Compare
Choose a tag to compare

All commands (besides the hook test ones) gained the ability to manage hooks globally with the --global option.
Like:

# Adds hooks in global directory (falls back to git config core.hooksPath and $COMPOSER_HOME)
cghooks add --global 
# You can also directly specify the directory
cghooks add --global --git-dir /home/brainmaestro/.config/git_hooks

The update, list-hooks and remove commands work similarly.

This change was non-trivial because the application assumed it was always being run in the current directory. Took the opportunity for some cleanup as well.

Accept array of commands for hook

02 Sep 01:42
5b2feb3
Compare
Choose a tag to compare

For more complex hooks, they can be written as separate commands in an array.
eg:

"pre-commit": [
    "echo committing as $(git config user.name)",
    "php-cs-fixer .",
    "phpunit"
]

Remove unneeded files from published package

01 Jun 14:27
Compare
Choose a tag to compare

Files that are not necessary for the library are excluded with .gitattrributes

v2.4.2: Pass composer.json dir (#13)

29 Jan 09:37
Compare
Choose a tag to compare
Signed-off-by: Stiliyan Ivanov <stily.c@gmail.com>