Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added author and release_branch option for configuration

  • Loading branch information...
commit f09949ab9b8c386bec2b0211a930b670cfe6591c 1 parent 315f9d4
Torsten Raudssus authored
Showing with 34 additions and 5 deletions.
  1. +34 −5 lib/Dist/Zilla/PluginBundle/Author/GETTY.pm
39 lib/Dist/Zilla/PluginBundle/Author/GETTY.pm
View
@@ -3,7 +3,7 @@ package Dist::Zilla::PluginBundle::Author::GETTY;
use Moose;
use Moose::Autobox;
-use Dist::Zilla 2.100922; # TestRelease
+use Dist::Zilla;
with 'Dist::Zilla::Role::PluginBundle::Easy';
=head1 DESCRIPTION
@@ -45,9 +45,24 @@ This is the plugin bundle that GETTY uses. It is equivalent to:
wrap_column = 74
debug = 0
+You can configure it (given values are default):
+
+ [@Author::GETTY]
+ author = GETTY
+ release_branch = master
+ weaver_config = @Author::GETTY
+
If the C<task> argument is given to the bundle, PodWeaver is replaced with
-TaskWeaver and Git::NextVersion is replaced with AutoVersion. If the
-C<manual_version> argument is given, AutoVersion is omitted.
+TaskWeaver and Git::NextVersion is replaced with AutoVersion:
+
+ [@Author::GETTY]
+ task = 1
+
+If the C<manual_version> argument is given, AutoVersion and Git::NextVersion
+are omitted.
+
+ [@Author::GETTY]
+ manual_version = 1.222333
=cut
@@ -68,6 +83,20 @@ has major_version => (
default => sub { $_[0]->payload->{version} || 0 },
);
+has author => (
+ is => 'ro',
+ isa => 'Str',
+ lazy => 1,
+ default => sub { 'GETTY' },
+);
+
+has release_branch => (
+ is => 'ro',
+ isa => 'Str',
+ lazy => 1,
+ default => sub { 'master' },
+);
+
has is_task => (
is => 'ro',
isa => 'Bool',
@@ -127,14 +156,14 @@ sub configure {
$self->add_plugins([
'Authority' => {
- authority => 'cpan:GETTY',
+ authority => 'cpan:'.$self->author,
do_metadata => 1,
}
]);
$self->add_plugins([
'Git::CheckFor::CorrectBranch' => {
- release_branch => 'master',
+ release_branch => $self->release_branch,
},
]);
Please sign in to comment.
Something went wrong with that request. Please try again.