@@ 31-45 (lines=15) @@ | ||
28 | /** |
|
29 | * Configure the command. |
|
30 | */ |
|
31 | protected function configure() |
|
32 | { |
|
33 | $this->setName('configure') |
|
34 | ->setDescription('Configure your hooks.') |
|
35 | ->setHelp('This command creates or updates your captainhook configuration.') |
|
36 | ->addOption('extend', 'e', InputOption::VALUE_NONE, 'Extend existing configuration file') |
|
37 | ->addOption('force', 'f', InputOption::VALUE_NONE, 'Overwrite existing configuration file') |
|
38 | ->addOption( |
|
39 | 'configuration', |
|
40 | 'c', |
|
41 | InputOption::VALUE_OPTIONAL, |
|
42 | 'Path to your json configuration', |
|
43 | getcwd() . DIRECTORY_SEPARATOR . 'captainhook.json' |
|
44 | ); |
|
45 | } |
|
46 | ||
47 | /** |
|
48 | * Execute the command. |
@@ 33-47 (lines=15) @@ | ||
30 | /** |
|
31 | * Configure the command. |
|
32 | */ |
|
33 | protected function configure() |
|
34 | { |
|
35 | $this->setName('run') |
|
36 | ->setDescription('Run git hook.') |
|
37 | ->setHelp("This command executes a configured git hook.") |
|
38 | ->addArgument('hook', InputArgument::REQUIRED, 'Hook you want to execute.') |
|
39 | ->addOption('message', 'm', InputOption::VALUE_OPTIONAL, 'File containing the commit message.') |
|
40 | ->addOption( |
|
41 | 'configuration', |
|
42 | 'c', |
|
43 | InputOption::VALUE_OPTIONAL, |
|
44 | 'Path to your json configuration', |
|
45 | getcwd() . DIRECTORY_SEPARATOR . 'captainhook.json' |
|
46 | ); |
|
47 | } |
|
48 | ||
49 | /** |
|
50 | * Execute the command. |