line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Minilla::CLI::Dist; |
2
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
3
|
1
|
|
|
1
|
|
16
|
use warnings; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
22
|
|
4
|
1
|
|
|
1
|
|
8
|
use utf8; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
44
|
use File::Spec::Functions qw(catfile); |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
61
|
|
7
|
1
|
|
|
1
|
|
10
|
use File::Basename qw(basename); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
58
|
|
8
|
1
|
|
|
1
|
|
7
|
use File::Copy qw(copy); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
46
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
6
|
use Minilla::Project; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
36
|
|
11
|
1
|
|
|
1
|
|
6
|
use Minilla::Util qw(check_git parse_options); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
253
|
|
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__ |