]> Dogcows Code - chaz/p5-Dist-Zilla-PluginBundle-Author-CCM/blobdiff - lib/Dist/Zilla/PluginBundle/Author/CCM.pm
WIP: switch from TravisYML to TravisCI
[chaz/p5-Dist-Zilla-PluginBundle-Author-CCM] / lib / Dist / Zilla / PluginBundle / Author / CCM.pm
index 3cdcea1d5e751a36035f4cc18b07acbcf37dee91..85adfac5030ec63a0690e30acbfc6eb1333423f2 100644 (file)
@@ -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]
@@ -84,7 +82,7 @@ You probably don't want to use this.
     filename            = README
     location            = build
     type                = text
-    [TravisYML]
+    [TravisCI] TODO
     [Manifest]
     [ManifestSkip]
 
@@ -93,6 +91,7 @@ You probably don't want to use this.
     ; RELEASE
     [CheckChangesHasContent]
     [Git::Check]
+    [RunExtraTests]
     [TestRelease]
     [ConfirmRelease]
     [UploadToCPAN]              ; disable with the "no_upload" attribute
@@ -125,6 +124,22 @@ use Dist::Zilla::Util;
 use Moose;
 use namespace::autoclean;
 
+=attr authority
+
+Specify the release authority. Defaults to C<cpan:CCM>.
+
+=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:
@@ -185,7 +200,8 @@ sub configure {
     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 @gather_noprune  = qw(.travis.yml);
+    my @no_index        = qw(eg share shares t xt .travis.yml);
     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);
@@ -197,15 +213,13 @@ sub configure {
         ['NextRelease'],
         ['ReversionOnRelease' => {prompt => 1}],
 
-        ['ExecDir'],
-        ['ExtraTests'],
-
         # GATHER
         ['Git::GatherDir' => {exclude_filename  => [@gather_exclude]}],
-        ['PruneCruft'],
+        ['PruneCruft' => {except => [@gather_noprune]}],
         ['PruneFiles' => {filename => [@gather_prune]}],
 
         ['CopyFilesFromBuild' => {copy => [@copy_from_build]}],
+        ['ExecDir'],
 
         # PREREQS
         ['AutoPrereqs'],
@@ -227,7 +241,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 +258,8 @@ 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'],
+        ['TravisCI' => 'repo travis' => {perl_version => [qw(5.24 5.22 5.20 5.18 5.16 5.14)]}],
+        ['TravisCI' => 'dist travis' => {write_to => 'build'}],
         ['Manifest'],
         ['ManifestSkip'],
 
@@ -253,6 +268,7 @@ sub configure {
         # RELEASE
         ['CheckChangesHasContent'],
         ['Git::Check' => {allow_dirty => [@allow_dirty], untracked_files => 'ignore'}],
+        ['RunExtraTests'],
         ['TestRelease'],
         # ['ConfirmRelease'],
         $self->no_upload ? ['FakeRelease'] : ['UploadToCPAN'],
This page took 0.028413 seconds and 4 git commands to generate.