Skip to content

Commit 61b6c50

Browse files
Prepare version 4.0.0
1 parent caf8bb5 commit 61b6c50

File tree

2 files changed

+20
-11
lines changed

2 files changed

+20
-11
lines changed

README.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Composer-Plugin for [CaptainHook](https://github.com/captainhookphp/captainhook)
22

3-
This is a composer-plugin that installs CaptainHook and the corresponding git hooks. For more information visit its [Website](https://github.com/captainhookphp/captainhook).
3+
This is a composer-plugin that installs _CaptainHook_ and the corresponding git hooks. For more information visit its [Website](https://github.com/captainhookphp/captainhook).
44

55
[![Latest Stable Version](https://poser.pugx.org/captainhook/plugin-composer/v/stable.svg?v=1)](https://packagist.org/packages/captainhook/plugin-composer)
66
[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%207.1-8892BF.svg)](https://php.net/)
@@ -17,16 +17,27 @@ $ composer require --dev captainhook/plugin-composer
1717

1818
Everything else will happen automagically.
1919

20-
## Setup
20+
## Customize
2121

22-
The plugin will install CaptainHook and make sure the git-hooks are installed. The configuration though is still
23-
done using CaptainHook.
22+
You can set a custom name for your hook configuration and a custom path to your .git directory
23+
if it is not located in the same directory as your *composer.json* file.
24+
Just add these values to your *composer.json* in the *extra* section first.
25+
```json
26+
{
27+
"extra": {
28+
"captainhook-config": "hooks.json",
29+
"captainhook-git-dir": "../.git"
30+
}
31+
32+
}
2433

25-
So after first installation you should run `vendor/bin/captainhook configure -e` and then commit the file
26-
`captainhook.json` to version control. Then everyone using your project will also have the configured hooks installed.
34+
```
35+
36+
If you want to see the installation in action have a look at this short installation video.
37+
38+
[![Install demo](http://img.youtube.com/vi/agwTZ0jhDDs/0.jpg)](https://www.youtube.com/watch?v=agwTZ0jhDDs)
2739

2840
## A word of warning
2941

3042
It is still possible to commit without invoking the hooks.
31-
So make sure you run appropriate backend-sanity checks on
32-
your code!
43+
So make sure you run appropriate backend-sanity checks on your code!

composer.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
"email": "[email protected]"
1414
}
1515
],
16-
"minimum-stability": "dev",
17-
"prefer-stable": true,
1816
"require": {
1917
"php": "^7.1",
2018
"composer-plugin-api": "^1.1",
@@ -26,7 +24,7 @@
2624
"extra": {
2725
"class": "CaptainHook\\Plugin\\Composer\\ComposerPlugin",
2826
"branch-alias": {
29-
"dev-fluffy_hedgehog": "4.0.x-dev"
27+
"dev-fluffy_hedgehog": "5.0.x-dev"
3028
}
3129
},
3230
"config": {

0 commit comments

Comments
 (0)