]>
Dogcows Code - chaz/p5-Dist-Zilla-PluginBundle-Author-CCM/blob - lib/Dist/Zilla/PluginBundle/Author/CCM.pm
1 package Dist
::Zilla
::PluginBundle
::Author
::CCM
;
2 # ABSTRACT: A plugin bundle for distributions built by CCM
3 # KEYWORDS: dzil author bundle distribution tool
9 our $VERSION = '0.003'; # VERSION
11 use Dist
::Zilla
::Util
;
13 use namespace
::autoclean
;
22 $self->payload->{'Authority.authority'} // $self->payload->{authority
} // 'cpan:CCM';
31 default => sub { shift-
>payload->{installer
} || 'MakeMaker' },
39 default => sub { $ENV{DZIL_AIRPLANE
} // shift-
>payload->{airplane
} // 0 },
47 default => sub { $ENV{DZIL_NO_UPLOAD
} // shift-
>payload->{no_upload
} // 0 },
54 if ($self->no_upload) {
55 print '[@Author::CCM] WARNING! WARNING! WARNING! *** You are in no_upload mode!! ***', "\n";
58 my @copy_from_build = qw(LICENSE);
59 my @network_plugins = qw(Git::Push Test::Pod::No404s UploadToCPAN);
60 my @gather_exclude = (@copy_from_build, qw(README.md));
61 my @gather_prune = qw(dist.ini);
62 my @no_index = qw(eg share shares t xt);
63 my @allow_dirty = (@copy_from_build, qw(.travis.yml Changes LICENSE README.md));
64 my @git_remotes = qw(github origin);
65 my @check_files = qw(:InstallModules :ExecFiles :TestFiles :ExtraTestFiles);
72 ['ReversionOnRelease' => {prompt
=> 1}],
75 ['Git::GatherDir' => {exclude_filename
=> [@gather_exclude]}],
77 ['PruneFiles' => {filename
=> [@gather_prune]}],
79 ['CopyFilesFromBuild' => {copy
=> [@copy_from_build]}],
84 -f
'cpanfile' ? ['Prereqs::FromCPANfile'] : (),
85 ['Prereqs::AuthorDeps'],
89 ['Test::CPAN::Changes'],
92 ['Test::Pod::No404s'],
94 ['Test::EOL' => {finder
=> [@check_files]}],
95 ['Test::NoTabs' => {finder
=> [@check_files]}],
96 ['Test::Perl::Critic'],
97 ['Test::Portability'],
98 ['Test::CleanNamespaces'],
99 ['Test::ReportPrereqs'],
102 ['Authority' => {authority
=> $self->authority, do_munging
=> 0}],
105 ['MetaNoIndex' => {directory
=> [@no_index]}],
106 ['MetaProvides::Package'],
108 ['Git::Contributors' => {order_by
=> 'commits'}],
109 ['GithubMeta' => {remote
=> [@git_remotes], issues
=> 1}],
112 ['PodWeaver' => {config_plugin
=> '@Author::CCM'}],
113 ['OverridePkgVersion'],
117 ['ReadmeAnyFromPod' => 'repo readme' => {filename
=> 'README.md', location
=> 'root', type
=> 'markdown', phase
=> 'release'}],
118 ['ReadmeAnyFromPod' => 'dist readme' => {filename
=> 'README', location
=> 'build', type
=> 'text'}],
123 $self->installer, # e.g. MakeMaker
126 ['CheckChangesHasContent'],
127 ['Git::Check' => {allow_dirty
=> [@allow_dirty], untracked_files
=> 'ignore'}],
130 # ['ConfirmRelease'],
131 $self->no_upload ? ['FakeRelease'] : ['UploadToCPAN'],
132 ['Git::Commit' => {allow_dirty
=> [@allow_dirty], commit_msg
=> 'Release %N %v%t%n%n%c'}],
133 ['Git::CommitBuild' => {branch
=> '', release_branch
=> 'dist', release_message
=> 'Version %v%t'}],
134 ['Git::Tag' => {tag_message
=> 'Version %v%t%n%n%c'}],
135 $self->no_upload ? () : ['Git::Push' => {push_to
=> 'origin master +master:refs/heads/release +dist', remotes_must_exist
=> 0}],
139 if ($self->airplane) {
140 my %network_plugins = map { Dist
::Zilla
::Util-
>expand_config_package_name($_) => 1 } @network_plugins;
142 @plugins = grep { !$network_plugins{Dist
::Zilla
::Util-
>expand_config_package_name(ref eq 'ARRAY' ? $_->[0] : $_)} } @plugins;
143 push @plugins, 'BlockRelease';
146 push @plugins, 'ConfirmRelease';
148 $self->add_plugins(@plugins);
151 with
'Dist::Zilla::Role::PluginBundle::Easy';
152 with
'Dist::Zilla::Role::PluginBundle::PluginRemover';
153 with
'Dist::Zilla::Role::PluginBundle::Config::Slicer';
155 __PACKAGE__-
>meta->make_immutable;
166 Dist::Zilla::PluginBundle::Author::CCM - A plugin bundle for distributions built by CCM
174 # In your dist.ini file:
179 You probably don't want to use this.
189 exclude_filename = LICENSE
190 exclude_filename = README.md
201 [Prereqs::FromCPANfile] ; if a cpanfile exists in root
202 [Prereqs::AuthorDeps]
206 [Test::CPAN::Changes]
215 [Test::CleanNamespaces]
216 [Test::ReportPrereqs]
229 [MetaProvides::Package]
238 config_plugin = @Author::CCM
256 [MakeMaker] ; override with the "installer" attribute
259 [CheckChangesHasContent]
264 [UploadToCPAN] ; disable with the "no_upload" attribute
266 commit_msg = Release %N %v%t%n%n%c
269 release_branch = dist
270 release_message = Version %v%t
272 tag_message = Version %v%t%n%n%c
274 push_to = origin master +master:refs/heads/release +dist
275 remotes_must_exist = 0
281 Specify the release authority. Defaults to C<cpan:CCM>.
285 Specify which installer to use, such as:
291 C<MakeMaker> (default)
301 Disable plugins that use the network, and prevent releasing.
305 Do not upload to CPAN or git push.
311 Required by L<Dist::Zilla::Role::PluginBundle::Easy>.
323 L<Dist::Zilla::PluginBundle::Author::ETHER>
329 Please report any bugs or feature requests on the bugtracker website
330 L<https://github.com/chazmcgarvey/Dist-Zilla-PluginBundle-Author-CCM/issues>
332 When submitting a bug or request, please include a test-file or a
333 patch to an existing test-file that illustrates the bug or desired
338 Charles McGarvey <chazmcgarvey@brokenzipper.com>
340 =head1 COPYRIGHT AND LICENSE
342 This software is copyright (c) 2016 by Charles McGarvey.
344 This is free software; you can redistribute it and/or modify it under
345 the same terms as the Perl 5 programming language system itself.
This page took 0.050841 seconds and 4 git commands to generate.