line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Minilla::CLI::Build; |
2
|
1
|
|
|
1
|
|
4176
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
4
|
1
|
|
|
1
|
|
4
|
use utf8; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
5
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
35
|
use File::Path qw(rmtree mkpath); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
49
|
|
7
|
1
|
|
|
1
|
|
5
|
use File::Spec; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
41
|
|
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
6
|
use Minilla::Project; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
20
|
|
10
|
1
|
|
|
1
|
|
4
|
use Minilla::WorkDir; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
11
|
1
|
|
|
1
|
|
6
|
use Minilla::Logger; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
61
|
|
12
|
1
|
|
|
1
|
|
6
|
use Minilla::Util qw(parse_options); |
|
1
|
|
|
|
|
2
|
|
|
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__ |