X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fp5-Dist-Zilla-PluginBundle-Author-CCM;a=blobdiff_plain;f=lib%2FDist%2FZilla%2FPluginBundle%2FAuthor%2FCCM.pm;h=3cdcea1d5e751a36035f4cc18b07acbcf37dee91;hp=a8a327f50a7c6ce4e36b0fdcc7a5063a1df56ec7;hb=faf846a96d49554080e9d65f66e1ad26e54104b1;hpb=fb8925433e905ddc2f5c7dd8d74d51eff4994cbb diff --git a/lib/Dist/Zilla/PluginBundle/Author/CCM.pm b/lib/Dist/Zilla/PluginBundle/Author/CCM.pm index a8a327f..3cdcea1 100644 --- a/lib/Dist/Zilla/PluginBundle/Author/CCM.pm +++ b/lib/Dist/Zilla/PluginBundle/Author/CCM.pm @@ -79,6 +79,7 @@ You probably don't want to use this. filename = README.md locaton = root type = markdown + phase = release [ReadmeAnyFromPod] filename = README location = build @@ -156,7 +157,7 @@ has airplane => ( =attr no_upload -Do not upload to CPAN. +Do not upload to CPAN or git push. =cut @@ -164,7 +165,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 +177,10 @@ Required by L. 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)); @@ -237,7 +242,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'], @@ -254,7 +259,7 @@ sub configure { ['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}], );