X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fp5-Dist-Zilla-PluginBundle-Author-CCM;a=blobdiff_plain;f=lib%2FDist%2FZilla%2FPluginBundle%2FAuthor%2FCCM.pm;h=d1af73460fdbdffa3d0207fc250251c8138a6c31;hp=27b15b8a4c83cefee140297a9174c3efc064f573;hb=12cd6dd0f032cfdd9221e7aa6b4097f37faebdf1;hpb=b582f56359e9a5e87019876758b1df1ac561875d diff --git a/lib/Dist/Zilla/PluginBundle/Author/CCM.pm b/lib/Dist/Zilla/PluginBundle/Author/CCM.pm index 27b15b8..d1af734 100644 --- a/lib/Dist/Zilla/PluginBundle/Author/CCM.pm +++ b/lib/Dist/Zilla/PluginBundle/Author/CCM.pm @@ -13,9 +13,6 @@ You probably don't want to use this. ; VERSION [Git::NextVersion] - [NextRelease] - [ReversionOnRelease] - prompt = 1 ; GATHER [Git::GatherDir] @@ -84,14 +81,13 @@ You probably don't want to use this. filename = README location = build type = text - [TravisYML] - build_branch = /^(dist|build\/.*)$/ [Manifest] [ManifestSkip] [MakeMaker] ; override with the "installer" attribute ; RELEASE + [NextRelease] [CheckChangesHasContent] [Git::Check] [RunExtraTests] @@ -126,8 +122,25 @@ our $VERSION = '999.999'; # VERSION use Dist::Zilla::Util; use Moose; +use Perl::Version; use namespace::autoclean; +=attr max_target_perl + +Specify the minimum perl version. Defaults to C<5.10.1>. + +=cut + +has max_target_perl => ( + is => 'ro', + isa => 'Str', + lazy => 1, + default => sub { + my $self = shift; + $self->payload->{'Test::MinimumVersion.max_target_perl'} // $self->payload->{max_target_perl} // '5.10.1'; + }, +); + =attr authority Specify the release authority. Defaults to C. @@ -158,7 +171,7 @@ has installer => ( is => 'ro', isa => 'Str', lazy => 1, - default => sub { shift->payload->{installer} || 'MakeMaker' }, + default => sub { shift->payload->{installer} // 'MakeMaker' }, ); =attr airplane @@ -201,12 +214,10 @@ sub configure { my @gather_exclude = (@copy_from_build, qw(README.md)); my @gather_prune = qw(dist.ini); my @no_index = qw(eg share shares t xt); - my @allow_dirty = (@copy_from_build, qw(.travis.yml Changes LICENSE README.md)); + my @allow_dirty = (@copy_from_build, qw(Changes LICENSE README.md)); my @git_remotes = qw(github origin); my @check_files = qw(:InstallModules :ExecFiles :TestFiles :ExtraTestFiles); - my $perl_version_target = '5.10.1'; - my $perl_version = '5.24 5.22 5.20 5.18 5.16 5.14'; - my $perl_version_build = $perl_version . ' 5.12 5.10 -5.8'; + my $perl_version_target = $self->max_target_perl; if ($self->no_upload) { say '[@Author::CCM] WARNING! WARNING! WARNING! *** You are in no_upload mode!! ***'; @@ -216,8 +227,6 @@ sub configure { # VERSION ['Git::NextVersion'], - ['NextRelease'], - ['ReversionOnRelease' => {prompt => 1}], # GATHER ['Git::GatherDir' => {exclude_filename => [@gather_exclude]}], @@ -265,13 +274,13 @@ sub configure { ['License'], ['ReadmeAnyFromPod' => 'RepoReadme' => {filename => 'README.md', location => 'root', type => 'markdown', phase => 'release'}], ['ReadmeAnyFromPod' => 'DistReadme' => {filename => 'README', location => 'build', type => 'text'}], - ['TravisYML' => {build_branch => '/^(dist|build\/.*)$/', perl_version => $perl_version, perl_version_build => $perl_version_build}], ['Manifest'], ['ManifestSkip'], $self->installer, # e.g. MakeMaker # RELEASE + ['NextRelease'], ['CheckChangesHasContent'], ['Git::Check' => {allow_dirty => [@allow_dirty], untracked_files => 'ignore'}], ['RunExtraTests'],