]> Dogcows Code - chaz/p5-Dist-Zilla-PluginBundle-Author-CCM/blobdiff - lib/Dist/Zilla/PluginBundle/Author/CCM.pm
remove use of DZP::ReversionOnRelease
[chaz/p5-Dist-Zilla-PluginBundle-Author-CCM] / lib / Dist / Zilla / PluginBundle / Author / CCM.pm
index 7a51fd85ad2a739cf453bca0e582264e54415bb4..d1af73460fdbdffa3d0207fc250251c8138a6c31 100644 (file)
@@ -13,8 +13,6 @@ You probably don't want to use this.
 
     ; VERSION
     [Git::NextVersion]
-    [ReversionOnRelease]
-    prompt              = 1
 
     ; GATHER
     [Git::GatherDir]
@@ -83,8 +81,6 @@ You probably don't want to use this.
     filename            = README
     location            = build
     type                = text
-    [TravisYML]
-    build_branch        = /^(dist|build\/.*)$/
     [Manifest]
     [ManifestSkip]
 
@@ -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<cpan:CCM>.
@@ -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,43 +214,19 @@ 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!! ***';
     }
 
-    if (!$self->payload->{'TravisYML.support_builddir'}) {
-        # swap perl_version and perl_version_build because DZP::TravisYML got it backwards!
-        # https://github.com/SineSwiper/Dist-Zilla-TravisCI/pull/40
-
-        my $tmp = $self->payload->{'TravisYML.perl_version_build'};
-        if (defined $self->payload->{'TravisYML.perl_version'}) {
-            $self->payload->{'TravisYML.perl_version_build'} = $self->payload->{'TravisYML.perl_version'}
-        }
-        else {
-            delete $self->payload->{'TravisYML.perl_version_build'};
-        }
-        if (defined $tmp) {
-            $self->payload->{'TravisYML.perl_version'} = $tmp;
-        }
-        else {
-            delete $self->payload->{'TravisYML.perl_version'};
-        }
-
-        ($perl_version, $perl_version_build) = ($perl_version_build, $perl_version);
-    }
-
     my @plugins = (
 
         # VERSION
         ['Git::NextVersion'],
-        ['ReversionOnRelease' => {prompt => 1}],
 
         # GATHER
         ['Git::GatherDir' => {exclude_filename  => [@gather_exclude]}],
@@ -285,7 +274,6 @@ 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'],
 
This page took 0.022976 seconds and 4 git commands to generate.