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
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
4
|
1
|
|
|
1
|
|
8
|
use utf8; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
12
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
24
|
use File::Spec::Functions qw(catfile); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
57
|
|
7
|
1
|
|
|
1
|
|
7
|
use File::Basename qw(basename); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
44
|
|
8
|
1
|
|
|
1
|
|
15
|
use File::Copy qw(copy); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
41
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
13
|
use Minilla::Project; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
11
|
1
|
|
|
1
|
|
6
|
use Minilla::Util qw(check_git parse_options); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
235
|
|
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__ |