]> Dogcows Code - chaz/p5-Dist-Zilla-PluginBundle-Author-CCM/blobdiff - lib/Dist/Zilla/PluginBundle/Author/CCM.pm
remove ExtraTests and require Dist::Zilla 5.038
[chaz/p5-Dist-Zilla-PluginBundle-Author-CCM] / lib / Dist / Zilla / PluginBundle / Author / CCM.pm
index a8a327f50a7c6ce4e36b0fdcc7a5063a1df56ec7..58fc17dccb20ebd3b739b33e47beb0003b604fda 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]
@@ -79,6 +77,7 @@ You probably don't want to use this.
     filename            = README.md
     locaton             = root
     type                = markdown
+    phase               = release
     [ReadmeAnyFromPod]
     filename            = README
     location            = build
@@ -92,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
@@ -156,7 +156,7 @@ has airplane => (
 
 =attr no_upload
 
-Do not upload to CPAN.
+Do not upload to CPAN or git push.
 
 =cut
 
@@ -164,7 +164,7 @@ has no_upload => (
     is      => 'ro',
     isa     => 'Bool',
     lazy    => 1,
-    default => 0,
+    default => sub { $ENV{DZIL_NO_UPLOAD} // shift->payload->{no_upload} // 0 },
 );
 
 =method configure
@@ -176,6 +176,10 @@ Required by L<Dist::Zilla::Role::PluginBundle::Easy>.
 sub configure {
     my $self = shift;
 
+    if ($self->no_upload) {
+        print '[@Author::CCM] WARNING! WARNING! WARNING! *** You are in no_upload mode!! ***', "\n";
+    }
+
     my @copy_from_build = qw(LICENSE);
     my @network_plugins = qw(Git::Push Test::Pod::No404s UploadToCPAN);
     my @gather_exclude  = (@copy_from_build, qw(README.md));
@@ -192,15 +196,13 @@ sub configure {
         ['NextRelease'],
         ['ReversionOnRelease' => {prompt => 1}],
 
-        ['ExecDir'],
-        ['ExtraTests'],
-
         # GATHER
         ['Git::GatherDir' => {exclude_filename  => [@gather_exclude]}],
         ['PruneCruft'],
         ['PruneFiles' => {filename => [@gather_prune]}],
 
         ['CopyFilesFromBuild' => {copy => [@copy_from_build]}],
+        ['ExecDir'],
 
         # PREREQS
         ['AutoPrereqs'],
@@ -237,7 +239,7 @@ sub configure {
 
         # GENERATE FILES
         ['License'],
-        ['ReadmeAnyFromPod' => 'repo readme' => {filename => 'README.md', location => 'root', type => 'markdown'}],
+        ['ReadmeAnyFromPod' => 'repo readme' => {filename => 'README.md', location => 'root', type => 'markdown', phase => 'release'}],
         ['ReadmeAnyFromPod' => 'dist readme' => {filename => 'README', location => 'build', type => 'text'}],
         ['TravisYML'],
         ['Manifest'],
@@ -248,13 +250,14 @@ sub configure {
         # RELEASE
         ['CheckChangesHasContent'],
         ['Git::Check' => {allow_dirty => [@allow_dirty], untracked_files => 'ignore'}],
+        ['RunExtraTests'],
         ['TestRelease'],
         # ['ConfirmRelease'],
         $self->no_upload ? ['FakeRelease'] : ['UploadToCPAN'],
         ['Git::Commit' => {allow_dirty => [@allow_dirty], commit_msg => 'Release %N %v%t%n%n%c'}],
         ['Git::CommitBuild' => {branch => '', release_branch => 'dist', release_message => 'Version %v%t'}],
         ['Git::Tag' => {tag_message => 'Version %v%t%n%n%c'}],
-        ['Git::Push' => {push_to => 'origin master +master:refs/heads/release +dist', remotes_must_exist => 0}],
+        $self->no_upload ? () : ['Git::Push' => {push_to => 'origin master +master:refs/heads/release +dist', remotes_must_exist => 0}],
 
     );
 
This page took 0.026525 seconds and 4 git commands to generate.