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=f8e1d9bbafeb96ecf84716d5c5dffe93abf1fc1a;hp=3cdcea1d5e751a36035f4cc18b07acbcf37dee91;hb=2e3738877b55d063a7b10c03c93ab107bf3ef759;hpb=faf846a96d49554080e9d65f66e1ad26e54104b1 diff --git a/lib/Dist/Zilla/PluginBundle/Author/CCM.pm b/lib/Dist/Zilla/PluginBundle/Author/CCM.pm index 3cdcea1..f8e1d9b 100644 --- a/lib/Dist/Zilla/PluginBundle/Author/CCM.pm +++ b/lib/Dist/Zilla/PluginBundle/Author/CCM.pm @@ -17,9 +17,6 @@ You probably don't want to use this. [ReversionOnRelease] prompt = 1 - [ExecDir] - [ExtraTests] - ; GATHER [Git::GatherDir] exclude_filename = LICENSE @@ -30,6 +27,7 @@ You probably don't want to use this. [CopyFilesFromBuild] copy = LICENSE + [ExecDir] ; PREREQS [AutoPrereqs] @@ -43,6 +41,8 @@ You probably don't want to use this. [PodSyntaxTests] [Test::Pod::No404s] [Test::Compile] + [Test::MinimumVersion] + max_target_perl = 5.10.1 [Test::EOL] [Test::NoTabs] [Test::Perl::Critic] @@ -85,6 +85,7 @@ You probably don't want to use this. location = build type = text [TravisYML] + build_branch = /^(dist|build\/.*)$/ [Manifest] [ManifestSkip] @@ -93,6 +94,7 @@ You probably don't want to use this. ; RELEASE [CheckChangesHasContent] [Git::Check] + [RunExtraTests] [TestRelease] [ConfirmRelease] [UploadToCPAN] ; disable with the "no_upload" attribute @@ -116,6 +118,7 @@ You probably don't want to use this. =cut +use 5.014; use warnings; use strict; @@ -125,6 +128,22 @@ use Dist::Zilla::Util; use Moose; use namespace::autoclean; +=attr authority + +Specify the release authority. Defaults to C. + +=cut + +has authority => ( + is => 'ro', + isa => 'Str', + lazy => 1, + default => sub { + my $self = shift; + $self->payload->{'Authority.authority'} // $self->payload->{authority} // 'cpan:CCM'; + }, +); + =attr installer Specify which installer to use, such as: @@ -177,19 +196,22 @@ Required by L. sub configure { my $self = shift; + my @copy_from_build = qw(LICENSE); + my @network_plugins = qw(Git::Push Test::Pod::No404s UploadToCPAN); + 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 @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'; + if ($self->no_upload) { - print '[@Author::CCM] WARNING! WARNING! WARNING! *** You are in no_upload mode!! ***', "\n"; + say '[@Author::CCM] WARNING! WARNING! WARNING! *** You are in no_upload mode!! ***'; } - my @copy_from_build = qw(LICENSE); - my @network_plugins = qw(Git::Push Test::Pod::No404s UploadToCPAN); - 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 @git_remotes = qw(github origin); - my @check_files = qw(:InstallModules :ExecFiles :TestFiles :ExtraTestFiles); - my @plugins = ( # VERSION @@ -197,15 +219,13 @@ sub configure { ['NextRelease'], ['ReversionOnRelease' => {prompt => 1}], - ['ExecDir'], - ['ExtraTests'], - # GATHER ['Git::GatherDir' => {exclude_filename => [@gather_exclude]}], ['PruneCruft'], ['PruneFiles' => {filename => [@gather_prune]}], ['CopyFilesFromBuild' => {copy => [@copy_from_build]}], + ['ExecDir'], # PREREQS ['AutoPrereqs'], @@ -219,6 +239,7 @@ sub configure { ['PodSyntaxTests'], ['Test::Pod::No404s'], ['Test::Compile'], + ['Test::MinimumVersion' => {max_target_perl => $perl_version_target}], ['Test::EOL' => {finder => [@check_files]}], ['Test::NoTabs' => {finder => [@check_files]}], ['Test::Perl::Critic'], @@ -227,7 +248,7 @@ sub configure { ['Test::ReportPrereqs'], # METADATA - ['Authority' => {do_munging => 0}], + ['Authority' => {authority => $self->authority, do_munging => 0}], ['MetaJSON'], ['MetaYAML'], ['MetaNoIndex' => {directory => [@no_index]}], @@ -244,7 +265,7 @@ sub configure { ['License'], ['ReadmeAnyFromPod' => 'repo readme' => {filename => 'README.md', location => 'root', type => 'markdown', phase => 'release'}], ['ReadmeAnyFromPod' => 'dist readme' => {filename => 'README', location => 'build', type => 'text'}], - ['TravisYML'], + ['TravisYML' => {build_branch => '/^(dist|build\/.*)$/', perl_version => $perl_version, perl_version_build => $perl_version_build}], ['Manifest'], ['ManifestSkip'], @@ -253,6 +274,7 @@ sub configure { # RELEASE ['CheckChangesHasContent'], ['Git::Check' => {allow_dirty => [@allow_dirty], untracked_files => 'ignore'}], + ['RunExtraTests'], ['TestRelease'], # ['ConfirmRelease'], $self->no_upload ? ['FakeRelease'] : ['UploadToCPAN'],