]> Dogcows Code - chaz/p5-Dist-Zilla-PluginBundle-Author-CCM/commitdiff
Version 0.008
authorCharles McGarvey <chazmcgarvey@brokenzipper.com>
Sat, 26 Aug 2017 03:28:25 +0000 (21:28 -0600)
committerCharles McGarvey <chazmcgarvey@brokenzipper.com>
Sat, 26 Aug 2017 03:28:25 +0000 (21:28 -0600)
Changes
MANIFEST
META.json
META.yml
Makefile.PL
README
lib/Dist/Zilla/PluginBundle/Author/CCM.pm
lib/Pod/Weaver/PluginBundle/Author/CCM.pm
t/00-report-prereqs.dd

diff --git a/Changes b/Changes
index 1a181e9854cecd7b4847119c225ef5f7eed26fc6..aab92b1438d599e62fb32ec3e7b0d1951d24a328 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,10 @@
 Revision history for Dist-Zilla-PluginBundle-Author-CCM.
 
+0.008     2017-08-25 21:28:07-06:00 MST7MDT
+
+  * Automatically figure out perl_version and perl_version_build TravisYML
+    configuration based on configured minimum perl requirement
+
 0.007     2017-03-11 18:33:58-07:00 MST7MDT
 
   * Prevent writing wrong version to Changes
index f43d55b539a58191d568fb13a3f882f78d60c045..67c2e0e0969fe052538b8bbfd7eafd523af4206e 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,4 +1,4 @@
-# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.009.
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.010.
 .travis.yml
 Changes
 LICENSE
index b5413ad863ae3bef8d30e64a1c70c42dd3c68ed4..1ba15682317ef74ddd467cbbb8e6f246f5beaf6b 100644 (file)
--- a/META.json
+++ b/META.json
@@ -4,7 +4,7 @@
       "Charles McGarvey <chazmcgarvey@brokenzipper.com>"
    ],
    "dynamic_config" : 0,
-   "generated_by" : "Dist::Zilla version 6.009, CPAN::Meta::Converter version 2.150005",
+   "generated_by" : "Dist::Zilla version 6.010, CPAN::Meta::Converter version 2.150005",
    "keywords" : [
       "dzil",
       "author",
             "Dist::Zilla::Role::PluginBundle::PluginRemover" : "0",
             "Dist::Zilla::Util" : "0",
             "Moose" : "0",
+            "Perl::Version" : "0",
             "Pod::Elemental::Transformer::List" : "0",
             "Pod::Elemental::Transformer::Verbatim" : "0",
             "Pod::Weaver::Config::Assembler" : "0",
    "provides" : {
       "Dist::Zilla::PluginBundle::Author::CCM" : {
          "file" : "lib/Dist/Zilla/PluginBundle/Author/CCM.pm",
-         "version" : "0.007"
+         "version" : "0.008"
       },
       "Pod::Weaver::PluginBundle::Author::CCM" : {
          "file" : "lib/Pod/Weaver/PluginBundle/Author/CCM.pm",
-         "version" : "0.007"
+         "version" : "0.008"
       }
    },
    "release_status" : "stable",
          "web" : "https://github.com/chazmcgarvey/Dist-Zilla-PluginBundle-Author-CCM"
       }
    },
-   "version" : "0.007",
+   "version" : "0.008",
    "x_authority" : "cpan:CCM",
    "x_serialization_backend" : "Cpanel::JSON::XS version 3.0225"
 }
index 54df02deb667a11bae025ec6d80db2ec64eb04de..e3a6880a3c723b3e5491733d9874de2e4620be7f 100644 (file)
--- a/META.yml
+++ b/META.yml
@@ -12,7 +12,7 @@ build_requires:
 configure_requires:
   ExtUtils::MakeMaker: '0'
 dynamic_config: 0
-generated_by: 'Dist::Zilla version 6.009, CPAN::Meta::Converter version 2.150005'
+generated_by: 'Dist::Zilla version 6.010, CPAN::Meta::Converter version 2.150005'
 keywords:
   - dzil
   - author
@@ -34,10 +34,10 @@ no_index:
 provides:
   Dist::Zilla::PluginBundle::Author::CCM:
     file: lib/Dist/Zilla/PluginBundle/Author/CCM.pm
-    version: '0.007'
+    version: '0.008'
   Pod::Weaver::PluginBundle::Author::CCM:
     file: lib/Pod/Weaver/PluginBundle/Author/CCM.pm
-    version: '0.007'
+    version: '0.008'
 recommends:
   Dist::Zilla::Plugin::FakeRelease: '0'
   Dist::Zilla::Plugin::Prereqs::FromCPANfile: '0'
@@ -99,6 +99,7 @@ requires:
   Dist::Zilla::Role::PluginBundle::PluginRemover: '0'
   Dist::Zilla::Util: '0'
   Moose: '0'
+  Perl::Version: '0'
   Pod::Elemental::Transformer::List: '0'
   Pod::Elemental::Transformer::Verbatim: '0'
   Pod::Weaver::Config::Assembler: '0'
@@ -124,6 +125,6 @@ resources:
   bugtracker: https://github.com/chazmcgarvey/Dist-Zilla-PluginBundle-Author-CCM/issues
   homepage: https://github.com/chazmcgarvey/Dist-Zilla-PluginBundle-Author-CCM
   repository: https://github.com/chazmcgarvey/Dist-Zilla-PluginBundle-Author-CCM.git
-version: '0.007'
+version: '0.008'
 x_authority: cpan:CCM
 x_serialization_backend: 'YAML::Tiny version 1.70'
index db0d6577108c15b3b7c9c3a8c76b9611910f7e4d..b6f63f05defd69e0d01b307e19c9b816408c2dad 100644 (file)
@@ -1,4 +1,4 @@
-# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.009.
+# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.010.
 use strict;
 use warnings;
 
@@ -74,6 +74,7 @@ my %WriteMakefileArgs = (
     "Dist::Zilla::Role::PluginBundle::PluginRemover" => 0,
     "Dist::Zilla::Util" => 0,
     "Moose" => 0,
+    "Perl::Version" => 0,
     "Pod::Elemental::Transformer::List" => 0,
     "Pod::Elemental::Transformer::Verbatim" => 0,
     "Pod::Weaver::Config::Assembler" => 0,
@@ -103,7 +104,7 @@ my %WriteMakefileArgs = (
     "Test::More" => 0,
     "blib" => "1.01"
   },
-  "VERSION" => "0.007",
+  "VERSION" => "0.008",
   "test" => {
     "TESTS" => "t/*.t"
   }
@@ -172,6 +173,7 @@ my %FallbackPrereqs = (
   "IO::Handle" => 0,
   "IPC::Open3" => 0,
   "Moose" => 0,
+  "Perl::Version" => 0,
   "Pod::Elemental::Transformer::List" => 0,
   "Pod::Elemental::Transformer::Verbatim" => 0,
   "Pod::Weaver::Config::Assembler" => 0,
diff --git a/README b/README
index 31cf3f137be1c2d6bed66aa9aff64a2b51368eb8..eee8b87c2f1535fe97cfe7a147de7c3d81a46714 100644 (file)
--- a/README
+++ b/README
@@ -5,7 +5,7 @@ NAME
 
 VERSION
 
-    version 0.007
+    version 0.008
 
 SYNOPSIS
 
@@ -117,6 +117,10 @@ DESCRIPTION
 
 ATTRIBUTES
 
+ max_target_perl
+
+    Specify the minimum perl version. Defaults to 5.10.1.
+
  authority
 
     Specify the release authority. Defaults to cpan:CCM.
index 5105692ea75cc82f5eeb77ae9fda5a151b414fab..0b92f3020131fe49ff3da03a6d81ad145042f4ee 100644 (file)
@@ -7,13 +7,25 @@ use 5.014;
 use warnings;
 use strict;
 
-our $VERSION = '0.007'; # VERSION
+our $VERSION = '0.008'; # VERSION
 
 use Dist::Zilla::Util;
 use Moose;
+use Perl::Version;
 use namespace::autoclean;
 
 
+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';
+    },
+);
+
+
 has authority => (
     is      => 'ro',
     isa     => 'Str',
@@ -29,7 +41,7 @@ has installer => (
     is      => 'ro',
     isa     => 'Str',
     lazy    => 1,
-    default => sub { shift->payload->{installer} || 'MakeMaker' },
+    default => sub { shift->payload->{installer} // 'MakeMaker' },
 );
 
 
@@ -60,9 +72,8 @@ sub configure {
     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';
+    my $perl_version_target = $self->max_target_perl;
+    my ($perl_version, $perl_version_build) = $self->_travis_perl_versions($perl_version_target);
 
     if ($self->no_upload) {
         say '[@Author::CCM] WARNING! WARNING! WARNING! *** You are in no_upload mode!! ***';
@@ -174,6 +185,29 @@ sub configure {
     $self->add_plugins(@plugins);
 }
 
+sub _travis_perl_versions {
+    my $self = shift;
+
+    my $perl_version_target = Perl::Version->new(shift or die 'Missing target version');
+    my $min_version         = Perl::Version->new('5.14');
+    my $min_version_build   = Perl::Version->new($perl_version_target);
+    $min_version_build->subversion(0);
+
+    my @versions;
+    my @versions_build;
+
+    for my $v (qw{5.26 5.24 5.22 5.20 5.18 5.16 5.14 5.12 5.10 5.8}) {
+        my $version = Perl::Version->new($v);
+        push @versions,       "$version" if $version >= $min_version_build && $version >= $min_version;
+        push @versions_build, "$version" if $version >= $min_version_build;
+    }
+
+    my $perl_version       = join(' ', @versions);
+    my $perl_version_build = join(' ', @versions_build);
+
+    return ($perl_version, $perl_version_build);
+}
+
 with 'Dist::Zilla::Role::PluginBundle::Easy';
 with 'Dist::Zilla::Role::PluginBundle::PluginRemover';
 with 'Dist::Zilla::Role::PluginBundle::Config::Slicer';
@@ -193,7 +227,7 @@ Dist::Zilla::PluginBundle::Author::CCM - A plugin bundle for distributions built
 
 =head1 VERSION
 
-version 0.007
+version 0.008
 
 =head1 SYNOPSIS
 
@@ -305,6 +339,10 @@ You probably don't want to use this.
 
 =head1 ATTRIBUTES
 
+=head2 max_target_perl
+
+Specify the minimum perl version. Defaults to C<5.10.1>.
+
 =head2 authority
 
 Specify the release authority. Defaults to C<cpan:CCM>.
index 9c7491b1c7f07f350103f31feb1835e40999d352..2b9568601e0dfd111163b6b1e538cb4ca072f328 100644 (file)
@@ -6,7 +6,7 @@ use 5.008;
 use warnings;
 use strict;
 
-our $VERSION = '0.007'; # VERSION
+our $VERSION = '0.008'; # VERSION
 
 use Pod::Weaver::Config::Assembler;
 use namespace::autoclean;
@@ -105,7 +105,7 @@ Pod::Weaver::PluginBundle::Author::CCM - A plugin bundle for pod woven by CCM
 
 =head1 VERSION
 
-version 0.007
+version 0.008
 
 =head1 SYNOPSIS
 
index 6aaf3026aadb55690ab6afaf13e494acc31c1a9e..711e466f3b215118ea4448aa6c2634df85e8e5e7 100644 (file)
@@ -89,6 +89,7 @@ do { my $x = {
                                       'Dist::Zilla::Role::PluginBundle::PluginRemover' => '0',
                                       'Dist::Zilla::Util' => '0',
                                       'Moose' => '0',
+                                      'Perl::Version' => '0',
                                       'Pod::Elemental::Transformer::List' => '0',
                                       'Pod::Elemental::Transformer::Verbatim' => '0',
                                       'Pod::Weaver::Config::Assembler' => '0',
This page took 0.030371 seconds and 4 git commands to generate.