1 package Dist
::Zilla
::PluginBundle
::Author
::CCM
;
2 # ABSTRACT: A plugin bundle for distributions built by CCM
3 # KEYWORDS: dzil author bundle distribution tool
7 # In your dist.ini file:
12 You probably don't want to use this.
25 exclude_filename = LICENSE
26 exclude_filename = README.md
36 [Prereqs::FromCPANfile] ; if a cpanfile exists in root
50 [Test::CleanNamespaces]
64 [MetaProvides::Package]
73 config_plugin = @Author::CCM
90 [MakeMaker] ; override with the "installer" attribute
93 [CheckChangesHasContent]
97 [UploadToCPAN] ; disable with the "no_upload" attribute
99 commit_msg = Release %N %v%t%n%n%c
102 release_branch = dist
103 release_message = Version %v%t
105 tag_message = Version %v%t%n%n%c
107 push_to = origin master +master:refs/heads/release +dist
108 remotes_must_exist = 0
114 * L<Dist::Zilla::PluginBundle::Author::ETHER>
121 our $VERSION = '999.999'; # VERSION
123 use Dist
::Zilla
::Util
;
125 use namespace
::autoclean
;
129 Specify which installer to
use, such as
:
132 * C<MakeMaker> (default)
133 * C<MakeMaker::Custom>
141 default => sub { shift-
>payload->{installer
} || 'MakeMaker' },
146 Disable plugins that
use the network
, and prevent releasing
.
154 default => sub { $ENV{DZIL_AIRPLANE
} // shift-
>payload->{airplane
} // 0 },
159 Do
not upload to CPAN
.
172 Required by L
<Dist
::Zilla
::Role
::PluginBundle
::Easy
>.
179 my @copy_from_build = qw(LICENSE);
180 my @network_plugins = qw(Git::Push Test::Pod::No404s UploadToCPAN);
181 my @gather_exclude = (@copy_from_build, qw(README.md));
182 my @gather_prune = qw(dist.ini);
183 my @no_index = qw(eg share shares t xt);
184 my @allow_dirty = (@copy_from_build, qw(.travis.yml Changes LICENSE README.md));
185 my @git_remotes = qw(github origin);
186 my @check_files = qw(:InstallModules :ExecFiles :TestFiles :ExtraTestFiles);
191 ['Git::NextVersion'],
193 ['ReversionOnRelease' => {prompt
=> 1}],
199 ['Git::GatherDir' => {exclude_filename
=> [@gather_exclude]}],
201 ['PruneFiles' => {filename
=> [@gather_prune]}],
203 ['CopyFilesFromBuild' => {copy
=> [@copy_from_build]}],
207 -f
'cpanfile' ? ['Prereqs::FromCPANfile'] : (),
208 ['Prereqs::AuthorDeps'],
212 ['Test::CPAN::Changes'],
213 ['PodCoverageTests'],
215 ['Test::Pod::No404s'],
217 ['Test::EOL' => {finder
=> [@check_files]}],
218 ['Test::NoTabs' => {finder
=> [@check_files]}],
219 ['Test::Perl::Critic'],
220 ['Test::Portability'],
221 ['Test::CleanNamespaces'],
222 ['Test::ReportPrereqs'],
225 ['Authority' => {do_munging
=> 0}],
228 ['MetaNoIndex' => {directory
=> [@no_index]}],
229 ['MetaProvides::Package'],
231 ['Git::Contributors' => {order_by
=> 'commits'}],
232 ['GithubMeta' => {remote
=> [@git_remotes], issues
=> 1}],
235 ['PodWeaver' => {config_plugin
=> '@Author::CCM'}],
236 ['OverridePkgVersion'],
240 ['ReadmeAnyFromPod' => 'repo readme' => {filename
=> 'README.md', location
=> 'root', type
=> 'markdown'}],
241 ['ReadmeAnyFromPod' => 'dist readme' => {filename
=> 'README', location
=> 'build', type
=> 'text'}],
246 $self->installer, # e.g. MakeMaker
249 ['CheckChangesHasContent'],
250 ['Git::Check' => {allow_dirty
=> [@allow_dirty], untracked_files
=> 'ignore'}],
252 # ['ConfirmRelease'],
253 $self->no_upload ? ['FakeRelease'] : ['UploadToCPAN'],
254 ['Git::Commit' => {allow_dirty
=> [@allow_dirty], commit_msg
=> 'Release %N %v%t%n%n%c'}],
255 ['Git::CommitBuild' => {branch
=> '', release_branch
=> 'dist', release_message
=> 'Version %v%t'}],
256 ['Git::Tag' => {tag_message
=> 'Version %v%t%n%n%c'}],
257 ['Git::Push' => {push_to
=> 'origin master +master:refs/heads/release +dist', remotes_must_exist
=> 0}],
261 if ($self->airplane) {
262 my %network_plugins = map { Dist
::Zilla
::Util-
>expand_config_package_name($_) => 1 } @network_plugins;
264 @plugins = grep { !$network_plugins{Dist
::Zilla
::Util-
>expand_config_package_name(ref eq 'ARRAY' ? $_->[0] : $_)} } @plugins;
265 push @plugins, 'BlockRelease';
268 push @plugins, 'ConfirmRelease';
270 $self->add_plugins(@plugins);
273 with
'Dist::Zilla::Role::PluginBundle::Easy';
274 with
'Dist::Zilla::Role::PluginBundle::PluginRemover';
275 with
'Dist::Zilla::Role::PluginBundle::Config::Slicer';
277 __PACKAGE__-
>meta->make_immutable;