line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Minilla::CLI::Release; |
2
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
4
|
1
|
|
|
1
|
|
10
|
use utf8; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
4
|
|
5
|
1
|
|
|
1
|
|
875
|
use ExtUtils::MakeMaker qw(prompt); |
|
1
|
|
|
|
|
100922
|
|
|
1
|
|
|
|
|
71
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
8
|
use Minilla::Util qw(edit_file require_optional parse_options); |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
56
|
|
8
|
1
|
|
|
1
|
|
7
|
use Minilla::WorkDir; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
24
|
|
9
|
1
|
|
|
1
|
|
6
|
use Minilla::Logger; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
61
|
|
10
|
1
|
|
|
1
|
|
9
|
use Minilla::Project; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
283
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub run { |
13
|
0
|
|
|
0
|
0
|
|
my ($self, @args) = @_; |
14
|
|
|
|
|
|
|
|
15
|
0
|
|
|
|
|
|
my $opts = { |
16
|
|
|
|
|
|
|
test => 1, |
17
|
|
|
|
|
|
|
trial => 0, |
18
|
|
|
|
|
|
|
dry_run => 0, |
19
|
|
|
|
|
|
|
}; |
20
|
|
|
|
|
|
|
parse_options( |
21
|
|
|
|
|
|
|
\@args, |
22
|
|
|
|
|
|
|
'test!' => \$opts->{test}, |
23
|
|
|
|
|
|
|
'trial!' => \$opts->{trial}, |
24
|
|
|
|
|
|
|
'dry-run!' => \$opts->{dry_run}, |
25
|
|
|
|
|
|
|
'pause-config=s' => \$opts->{pause_config}, |
26
|
0
|
|
|
|
|
|
); |
27
|
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
|
my $project = Minilla::Project->new(); |
29
|
0
|
0
|
|
|
|
|
unless ($project->validate()) { |
30
|
0
|
|
|
|
|
|
return; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
0
|
|
|
|
|
|
my @steps = qw( |
34
|
|
|
|
|
|
|
CheckUntrackedFiles |
35
|
|
|
|
|
|
|
CheckOrigin |
36
|
|
|
|
|
|
|
CheckReleaseBranch |
37
|
|
|
|
|
|
|
BumpVersion |
38
|
|
|
|
|
|
|
CheckChanges |
39
|
|
|
|
|
|
|
RegenerateFiles |
40
|
|
|
|
|
|
|
RunHooks |
41
|
|
|
|
|
|
|
DistTest |
42
|
|
|
|
|
|
|
MakeDist |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
UploadToCPAN |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
RewriteChanges |
47
|
|
|
|
|
|
|
Commit |
48
|
|
|
|
|
|
|
Tag |
49
|
|
|
|
|
|
|
); |
50
|
0
|
|
|
|
|
|
my @klasses; |
51
|
|
|
|
|
|
|
# Load all step classes. |
52
|
0
|
|
|
|
|
|
for (@steps) { |
53
|
0
|
|
|
|
|
|
my $klass = "Minilla::Release::$_"; |
54
|
0
|
0
|
|
|
|
|
if (eval "require ${klass}; 1") { |
55
|
0
|
|
|
|
|
|
push @klasses, $klass; |
56
|
0
|
0
|
|
|
|
|
$klass->init() if $klass->can('init'); |
57
|
|
|
|
|
|
|
} else { |
58
|
0
|
|
|
|
|
|
errorf("Error while loading %s: %s\n", $_, $@); |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
# And run all steps. |
62
|
0
|
|
|
|
|
|
for my $klass (@klasses) { |
63
|
0
|
|
|
|
|
|
$klass->run($project, $opts); |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
1; |
68
|
|
|
|
|
|
|
__END__ |