From: Charles McGarvey Date: Fri, 23 Nov 2018 05:14:16 +0000 (-0700) Subject: remove use of DZP::TravisYML X-Git-Tag: v0.009~2 X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=4c99145f9a75126ac9a1a6a8f677fb9753783eb4;p=chaz%2Fp5-Dist-Zilla-PluginBundle-Author-CCM remove use of DZP::TravisYML --- diff --git a/dist.ini b/dist.ini index 58e6add..764a817 100644 --- a/dist.ini +++ b/dist.ini @@ -65,7 +65,6 @@ Dist::Zilla::Plugin::Test::Pod::No404s = 0 Dist::Zilla::Plugin::Test::Portability = 0 Dist::Zilla::Plugin::Test::ReportPrereqs = 0 Dist::Zilla::Plugin::TestRelease = 0 -Dist::Zilla::Plugin::TravisYML = 0 Dist::Zilla::Plugin::UploadToCPAN = 0 Perl::Version = 0 Pod::Elemental::Transformer::List = 0 @@ -83,10 +82,6 @@ Pod::Weaver::Section::Legal = 0 Pod::Weaver::Section::Name = 0 Pod::Weaver::Section::Region = 0 Pod::Weaver::Section::Version = 0 -; Pod::Weaver::Section::Badges = 0 -; Badge::Depot::Plugin::Coverage = 0 -; Badge::Depot::Plugin::Perl = 0 -; Badge::Depot::Plugin::Travis = 0 Test::CPAN::Meta = 0 [Prereqs / runtime recommends] @@ -97,5 +92,4 @@ Dist::Zilla::Plugin::Prereqs::FromCPANfile = 0 [@Author::CCM] Test::MinimumVersion.max_target_perl = 5.14.0 -TravisYML.perl_version_build = 5.24 5.22 5.20 5.18 5.16 5.14 diff --git a/lib/Dist/Zilla/PluginBundle/Author/CCM.pm b/lib/Dist/Zilla/PluginBundle/Author/CCM.pm index 177b79b..0adb016 100644 --- a/lib/Dist/Zilla/PluginBundle/Author/CCM.pm +++ b/lib/Dist/Zilla/PluginBundle/Author/CCM.pm @@ -83,8 +83,6 @@ You probably don't want to use this. filename = README location = build type = text - [TravisYML] - build_branch = /^(dist|build\/.*)$/ [Manifest] [ManifestSkip] @@ -218,37 +216,15 @@ 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 = $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!! ***'; } - 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 @@ -301,7 +277,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'], @@ -334,29 +309,6 @@ 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';