line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Minilla::CLI::Dist; |
2
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
21
|
|
4
|
1
|
|
|
1
|
|
6
|
use utf8; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
25
|
use File::Spec::Functions qw(catfile); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
69
|
|
7
|
1
|
|
|
1
|
|
8
|
use File::Basename qw(basename); |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
53
|
|
8
|
1
|
|
|
1
|
|
6
|
use File::Copy qw(copy); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
40
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
6
|
use Minilla::Project; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
34
|
|
11
|
1
|
|
|
1
|
|
6
|
use Minilla::Util qw(check_git parse_options); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
221
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub run { |
14
|
0
|
|
|
0
|
0
|
|
my ($self, @args) = @_; |
15
|
|
|
|
|
|
|
|
16
|
0
|
|
|
|
|
|
my $test = 1; |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
|
|
|
check_git; |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
parse_options( |
21
|
|
|
|
|
|
|
\@args, |
22
|
|
|
|
|
|
|
'test!' => \$test, |
23
|
|
|
|
|
|
|
); |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
my $project = Minilla::Project->new(); |
26
|
0
|
0
|
|
|
|
|
unless ($project->validate()) { |
27
|
0
|
|
|
|
|
|
return; |
28
|
|
|
|
|
|
|
} |
29
|
0
|
|
|
|
|
|
my $work_dir = $project->work_dir; |
30
|
0
|
0
|
|
|
|
|
if ($test) { |
31
|
0
|
|
|
|
|
|
local $ENV{RELEASE_TESTING} = 1; |
32
|
0
|
|
|
|
|
|
$work_dir->dist_test(); |
33
|
|
|
|
|
|
|
} |
34
|
0
|
|
|
|
|
|
my $tar = $work_dir->dist(); |
35
|
0
|
|
|
|
|
|
my $dst = catfile($project->dir, basename($tar)); |
36
|
0
|
|
|
|
|
|
copy($tar, $dst); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
__END__ |