| 1 | package Minilla::Release::RunHooks; | ||||||||||
| 2 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use utf8; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 0 | ▶ | sub run { | ||||||||
|
Subroutine
run: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||
| 7 | 0 | my ($self, $project, $opts) = @_; | |||||||||
| 8 | |||||||||||
| 9 | 0 | my $return_value = 0; | |||||||||
| 10 | 0 | my $commands = $project->config->{release}->{hooks}; | |||||||||
| 11 | |||||||||||
| 12 | 0 | ▶ | if ($commands) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 13 | 0 | ▶ | if (ref $commands ne 'ARRAY') { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 14 | 0 | warn "Release hooks must be array"; | |||||||||
| 15 | 0 | exit 1; | |||||||||
| 16 | } | ||||||||||
| 17 | 0 | $return_value = system(join ' && ', @$commands); | |||||||||
| 18 | } | ||||||||||
| 19 | |||||||||||
| 20 | 0 | ▶ | if ($return_value != 0) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 21 | # Failure executing command of hooks | ||||||||||
| 22 | 0 | exit 1; | |||||||||
| 23 | } | ||||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | 1 | 1; | |||||||||
| 27 | |||||||||||