Skip to content

Commit

Permalink
Added switch to deactivate ChangelogFromGit in favour for NextRelease
Browse files Browse the repository at this point in the history
  • Loading branch information
Getty committed Apr 21, 2013
1 parent 5877f30 commit 5b9bb16
Showing 1 changed file with 27 additions and 9 deletions.
36 changes: 27 additions & 9 deletions lib/Dist/Zilla/PluginBundle/Author/GETTY.pm
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ By default a dzil release would release to L<CPAN|http://www.cpan.org/>.
If set to 1, this attribute will disable L<Dist::Zilla::TravisCI>. By default a If set to 1, this attribute will disable L<Dist::Zilla::TravisCI>. By default a
dzil build or release would also generate a B<.travis.yml>. dzil build or release would also generate a B<.travis.yml>.
=head2 no_changelog_from_git
If set to 1, then L<Dist::Zilla::Plugin::ChangelogFromGit> will be disabled, and
L<Dist::Zilla::Plugin::NextRelease> will be used instead.
=head2 duckpan =head2 duckpan
If set to 1, this attribute will activate L<Dist::Zilla::Plugin::UploadToDuckPAN>. If set to 1, this attribute will activate L<Dist::Zilla::Plugin::UploadToDuckPAN>.
Expand Down Expand Up @@ -273,6 +278,13 @@ has no_travis => (
default => sub { $_[0]->payload->{no_travis} }, default => sub { $_[0]->payload->{no_travis} },
); );


has no_changelog_from_git => (
is => 'ro',
isa => 'Bool',
lazy => 1,
default => sub { $_[0]->payload->{no_changelog_from_git} },
);

has no_install => ( has no_install => (
is => 'ro', is => 'ro',
isa => 'Bool', isa => 'Bool',
Expand Down Expand Up @@ -461,15 +473,21 @@ sub configure {
} ], } ],
); );


$self->add_plugins([ if ($self->no_changelog_from_git) {
'ChangelogFromGit' => { $self->add_plugins(qw(
max_age => 99999, NextRelease
tag_regexp => '^v(.+)$', ));
file_name => 'Changes', } else {
wrap_column => 74, $self->add_plugins([
debug => 0, 'ChangelogFromGit' => {
} max_age => 99999,
]); tag_regexp => '^v(.+)$',
file_name => 'Changes',
wrap_column => 74,
debug => 0,
}
]);
}


if ($self->is_task) { if ($self->is_task) {
$self->add_plugins('TaskWeaver'); $self->add_plugins('TaskWeaver');
Expand Down

0 comments on commit 5b9bb16

Please sign in to comment.