hook¶
vb hook SUBCOMMAND [OPTIONS]
Subcommands¶
vb hook add¶
vb hook add --command COMMAND --type TYPE [--sequence NUMBER]
Description¶
Create a new hook. The –command and –type arguments are required. –sequence is optional.
vb hook delete¶
vb hook delete ID ...
Description¶
Delete one or more hooks by their IDs. ID can be all
to delete all hooks. Caution: There is no undo for
this operation. Deleted hooks are permanently lost.
vb hook edit¶
vb hook edit --command COMMAND --type TYPE --sequence NUMBER ID ...
Description¶
Make changes to one or more existing hooks. The ID argument
is either a hook-id, or a list of hook-ids, or the keyword
all. For example, to disable hook number 2, use
vb hook edit --type disabled 2
vb hook list¶
vb hook list
Description¶
Show all current hooks
vb hook status¶
vb hook status
Description¶
Print the values of CONFIG table entries that are relevant to hook processing. Used for debugging.
vb hook test¶
vb hook test [OPTIONS] ID
Description¶
Run the hook script given by ID for testing purposes.
The --base-rcvid and --new-rcvid options are silently ignored if
the hook type is not after-receive. The default values for
--base-rcvid and --new-rcvid cause the last receive to be processed.
Options¶
- --dry-run¶
Print the script on stdout rather than run it
- --base-rcvid N¶
Pretend that the hook-last-rcvid value is N
- --new-rcvid M¶
Pretend that the last rcvid value is M
- --aux-file NAME¶
NAME is substituted for %A in the script
Examples¶
List hooks (none expected), then add a disabled example hook and list again
$ vb hook list
$ vb hook list
0: type = disabled
command = echo hook
sequence = 10