line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Minilla::CLI::Build; |
2
|
1
|
|
|
1
|
|
4505
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
31
|
|
3
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
23
|
|
4
|
1
|
|
|
1
|
|
5
|
use utf8; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
6
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
25
|
use File::Path qw(rmtree mkpath); |
|
1
|
|
|
|
|
12
|
|
|
1
|
|
|
|
|
55
|
|
7
|
1
|
|
|
1
|
|
6
|
use File::Spec; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
45
|
|
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
19
|
use Minilla::Project; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
26
|
|
10
|
1
|
|
|
1
|
|
4
|
use Minilla::WorkDir; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
37
|
|
11
|
1
|
|
|
1
|
|
5
|
use Minilla::Logger; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
65
|
|
12
|
1
|
|
|
1
|
|
7
|
use Minilla::Util qw(parse_options); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
238
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub run { |
15
|
0
|
|
|
0
|
0
|
|
my ($class, @args) = @_; |
16
|
|
|
|
|
|
|
|
17
|
0
|
|
|
|
|
|
my $test = 1; |
18
|
0
|
|
|
|
|
|
parse_options( |
19
|
|
|
|
|
|
|
\@args, |
20
|
|
|
|
|
|
|
'test!' => \$test, |
21
|
|
|
|
|
|
|
); |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
|
|
|
my $project = Minilla::Project->new(); |
24
|
0
|
|
|
|
|
|
$project->regenerate_files(); |
25
|
0
|
0
|
|
|
|
|
unless ($project->validate()) { |
26
|
0
|
|
|
|
|
|
return; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
|
|
|
my $dst = File::Spec->rel2abs(sprintf("%s-%s", $project->dist_name, $project->version)); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
# generate project directory |
32
|
0
|
|
|
|
|
|
infof("Create %s\n", $dst); |
33
|
0
|
|
|
|
|
|
rmtree($dst); |
34
|
0
|
|
|
|
|
|
mkpath($dst); |
35
|
0
|
|
|
|
|
|
my $work_dir = Minilla::WorkDir->new(project => $project, dir => $dst, cleanup => 0); |
36
|
0
|
|
|
|
|
|
$work_dir->build(); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
__END__ |