Dist/Zilla/Plugin/Milla/FirstBuild.pm untested

filter: Statementstmt 0.0% 0 / 28 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 35 CC 1 SCAR 6.9
CC
1
Cov
0%
after_mint
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Dist::Zilla::Plugin::Milla::FirstBuild;
2 use Moose;
3 with 'Dist::Zilla::Role::AfterMint';
4  
5 use Dist::Milla::App;
6 use File::pushd;
7 use Git::Wrapper;
8  
9 sub after_mint {
10 my($self, $opts) = @_;
11  
12 $self->log("Running the initial build & clean");
13  
14 {
15 my $wd = File::pushd::pushd($opts->{mint_root});
16 for my $cmd (['build', '--no-tgz'], ['clean']) {
17 local @ARGV = (@$cmd);
18 Dist::Milla::App->run;
19 }
20 }
21  
22 my $git = Git::Wrapper->new("$opts->{mint_root}");
23 $git->add("$opts->{mint_root}");
24 }
25  
26 no Moose;
27 __PACKAGE__->meta->make_immutable;
28 1;