App-Oozie
view release on metacpan or search on metacpan
lib/App/Oozie/Role/Git.pm view on Meta::CPAN
package App::Oozie::Role::Git;
use 5.014;
use strict;
use warnings;
our $VERSION = '0.020'; # VERSION
use namespace::autoclean -except => [qw/_options_data _options_config/];
use App::Oozie::Constants qw( EMPTY_STRING );
use App::Oozie::Types::Common qw( IsDir );
use File::Find::Rule;
use Git::Repository;
use Moo::Role;
use Text::Trim qw( trim );
use Types::Standard qw( CodeRef );
use MooX::Options;
option gitfeatures => (
is => 'rw',
default => 0,
negatable => 1,
doc => 'Enable git features?',
);
option gitforce => (
is => 'rw',
doc => 'Force deployment despite git check failure(s)',
);
option git_repo_path => (
is => 'rw',
isa => IsDir,
format => 's',
doc => 'Git repository base path for workflows',
default => sub { },
);
has git_deploy_tag_pattern => (
is => 'rw',
default => sub { qr{}xms },
);
has git_tag_fetcher => (
is => 'rw',
isa => CodeRef,
lazy => 1,
default => sub {
my $self = shift;
return if ! $self->gitfeatures;
die 'git_tag_fetcher was not set!';
},
);
has dirty_deployed_files => (
is => 'rw',
default => sub {return 0},
);
has git => (
is => 'ro',
default => sub {
my $self = shift;
return if ! $self->gitfeatures;
return Git::Repository->new( work_tree => $self->git_repo_path );
},
lazy => 1,
);
( run in 1.766 second using v1.01-cache-2.11-cpan-524268b4103 )