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
-# 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
"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"
}
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
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'
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'
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'
-# 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;
"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,
"Test::More" => 0,
"blib" => "1.01"
},
- "VERSION" => "0.007",
+ "VERSION" => "0.008",
"test" => {
"TESTS" => "t/*.t"
}
"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,
VERSION
- version 0.007
+ version 0.008
SYNOPSIS
ATTRIBUTES
+ max_target_perl
+
+ Specify the minimum perl version. Defaults to 5.10.1.
+
authority
Specify the release authority. Defaults to cpan:CCM.
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',
is => 'ro',
isa => 'Str',
lazy => 1,
- default => sub { shift->payload->{installer} || 'MakeMaker' },
+ default => sub { shift->payload->{installer} // 'MakeMaker' },
);
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!! ***';
$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';
=head1 VERSION
-version 0.007
+version 0.008
=head1 SYNOPSIS
=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>.
use warnings;
use strict;
-our $VERSION = '0.007'; # VERSION
+our $VERSION = '0.008'; # VERSION
use Pod::Weaver::Config::Assembler;
use namespace::autoclean;
=head1 VERSION
-version 0.007
+version 0.008
=head1 SYNOPSIS
'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',