App-Sqitch
view release on metacpan or search on metacpan
lib/App/Sqitch/Command/bundle.pm view on Meta::CPAN
package App::Sqitch::Command::bundle;
use 5.010;
use strict;
use warnings;
use utf8;
use Moo;
use App::Sqitch::Types qw(Str Dir Maybe Bool);
use File::Path qw(make_path);
use Path::Class;
use Locale::TextDomain qw(App-Sqitch);
use App::Sqitch::X qw(hurl);
use File::Copy ();
use List::Util qw(first);
use namespace::autoclean;
extends 'App::Sqitch::Command';
with 'App::Sqitch::Role::ContextCommand';
our $VERSION = 'v1.6.1'; # VERSION
has from => (
is => 'ro',
isa => Maybe[Str],
);
has to => (
is => 'ro',
isa => Maybe[Str],
);
has dest_dir => (
is => 'ro',
isa => Dir,
lazy => 1,
default => sub { dir 'bundle' },
);
has all => (
is => 'ro',
isa => Bool,
default => 0
);
sub dest_top_dir {
my $self = shift;
dir $self->dest_dir, shift->top_dir->relative;
}
sub dest_dirs_for {
my ($self, $target) = @_;
my $dest = $self->dest_dir;
return {
deploy => dir($dest, $target->deploy_dir->relative),
revert => dir($dest, $target->revert_dir->relative),
verify => dir($dest, $target->verify_dir->relative),
reworked_deploy => dir($dest, $target->reworked_deploy_dir->relative),
reworked_revert => dir($dest, $target->reworked_revert_dir->relative),
reworked_verify => dir($dest, $target->reworked_verify_dir->relative),
};
}
sub options {
return qw(
dest-dir|dir=s
all|a!
from=s
to=s
);
}
sub configure {
my ( $class, $config, $opt ) = @_;
my %params;
( run in 0.727 second using v1.01-cache-2.11-cpan-0bb4e1dffa6 )