Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit 66663ff

Browse files
committed
Adding documentation.
1 parent 0cf22a3 commit 66663ff

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

phing/build.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ drush:
7070
verbose: ${blt.verbose}
7171

7272
git:
73-
# Changing a hook value to false will disable it.
73+
# The value of a hook should be the file path to a directory containing an
74+
# executable file named after the hook.
75+
# Changing a hook value to 'false' will disable it.
7476
hooks:
7577
pre-commit: ${blt.root}/scripts/git-hooks
7678
commit-msg: ${blt.root}/scripts/git-hooks

phing/tasks/setup.xml

-2
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,6 @@
228228
</target>
229229

230230
<target name="setup:git-hooks" description="Installs git hooks to local .git/hooks directory from version controlled scripts/git-hooks directory.">
231-
<echo level="verbose">Removing ${repo.root}/.git/hooks, if it exists.</echo>
232-
233231
<exec dir="${repo.root}/.git" command="mkdir -p hooks" logoutput="true" checkreturn="true" level="${blt.exec_level}" passthru="true"/>
234232
<delete file="${repo.root}/.git/hooks/pre-commit" failonerror="false" quiet="true" verbose="${blt.verbose}"/>
235233
<delete file="${repo.root}/.git/hooks/commit-msg" failonerror="false" quiet="true" verbose="${blt.verbose}"/>

readme/extending-blt.md

+18
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,24 @@ More specifically, you can modify the build artifact in the following key ways:
8686
dir: ${deploy.dir}/docroot/profiles/contrib/lightning
8787
command: npm run install-libraries
8888

89+
### setup:*
90+
91+
#### setup:git-hooks
92+
93+
You may disable a git hook by setting its value under `git.hooks` to false:
94+
95+
git:
96+
hooks:
97+
pre-commit: false
98+
99+
You may use a custom git hook in place of BLT's default git hooks by setting its value under `git.hooks` to the directory path containing of the hook. The directory must contain an executable file named after the git hook:
100+
101+
git:
102+
hooks:
103+
pre-commit: ${repo.root}/my-custom-git-hooks
104+
105+
In this example, an executable file named `pre-commit` should exist in `${repo.root}/my-custom-git-hooks`.
106+
89107
### tests:*
90108

91109
#### tests:behat

0 commit comments

Comments
 (0)