Skip to content

Commit

Permalink
Add exclude file option (deriv-com#7)
Browse files Browse the repository at this point in the history
* add exclude-file

* add changes

* apply exclude_filename
  • Loading branch information
chylli-deriv authored Dec 8, 2022
1 parent c3c13df commit 5055a7e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Revision history for {{$dist->name}}

{{$NEXT}}
add exclude_filename option to exclude some more files by Git::GatherDir

0.004 2022-09-28 11:51:02+00:00 UTC
fix bump version problem
Expand Down
11 changes: 9 additions & 2 deletions lib/Dist/Zilla/PluginBundle/Author/DERIV.pm
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,19 @@ has allow_dirty => (
default => sub {shift->payload->{allow_dirty} // [] },
);

sub mvp_multivalue_args{ qw(allow_dirty) }
has exclude_filename => (
is => 'ro',
lazy => 1,
default => sub {shift->payload->{exclude_filename} // [] },
);


sub mvp_multivalue_args{ qw(allow_dirty exclude_filename) }

sub configure {
my $self = shift;
my @copy_from_build = qw(LICENSE Makefile.PL);
my @gather_exclude = (@copy_from_build, qw(README.md));
my @gather_exclude = (@copy_from_build, qw(README.md), @{$self->exclude_filename});
my @no_index = qw(eg share shares t xt);
my @allow_dirty = (@copy_from_build, @{$self->allow_dirty}, qw(Changes LICENSE README.md));
my @git_remotes = qw(github origin);
Expand Down

0 comments on commit 5055a7e

Please sign in to comment.