]>
Dogcows Code - chaz/p5-Dist-Zilla-PluginBundle-Author-CCM/blob - lib/Dist/Zilla/PluginBundle/Author/CCM.pm
3fc159ca2140900f4da91241fb316e7de08b9480
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.001'; # VERSION
11 use Dist
::Zilla
::Util
;
13 use namespace
::autoclean
;
20 default => sub { shift-
>payload->{installer
} || 'MakeMaker' },
28 default => sub { $ENV{DZIL_AIRPLANE
} // shift-
>payload->{airplane
} // 0 },
43 my @copy_from_build = qw(LICENSE);
44 my @network_plugins = qw(Git::Push Test::Pod::No404s UploadToCPAN);
45 my @gather_exclude = (@copy_from_build, qw(README.md));
46 my @gather_prune = qw(dist.ini);
47 my @no_index = qw(eg share shares t xt);
48 my @allow_dirty = (@copy_from_build, qw(.travis.yml Changes LICENSE README.md));
49 my @git_remotes = qw(github origin);
50 my @check_files = qw(:InstallModules :ExecFiles :TestFiles :ExtraTestFiles);
57 ['ReversionOnRelease' => {prompt
=> 1}],
63 ['Git::GatherDir' => {exclude_filename
=> [@gather_exclude]}],
65 ['PruneFiles' => {filename
=> [@gather_prune]}],
67 ['CopyFilesFromBuild' => {copy
=> [@copy_from_build]}],
71 -f
'cpanfile' ? ['Prereqs::FromCPANfile'] : (),
72 ['Prereqs::AuthorDeps'],
76 ['Test::CPAN::Changes'],
79 ['Test::Pod::No404s'],
81 ['Test::EOL' => {finder
=> [@check_files]}],
82 ['Test::NoTabs' => {finder
=> [@check_files]}],
83 ['Test::Perl::Critic'],
84 ['Test::Portability'],
85 ['Test::CleanNamespaces'],
86 ['Test::ReportPrereqs'],
89 ['Authority' => {do_munging
=> 0}],
92 ['MetaNoIndex' => {directory
=> [@no_index]}],
93 ['MetaProvides::Package'],
95 ['Git::Contributors' => {order_by
=> 'commits'}],
96 ['GithubMeta' => {remote
=> [@git_remotes], issues
=> 1}],
99 ['PodWeaver' => {config_plugin
=> '@Author::CCM'}],
100 ['OverridePkgVersion'],
104 ['ReadmeAnyFromPod' => 'repo readme' => {filename
=> 'README.md', location
=> 'root', type
=> 'markdown'}],
105 ['ReadmeAnyFromPod' => 'dist readme' => {filename
=> 'README', location
=> 'build', type
=> 'text'}],
110 $self->installer, # e.g. MakeMaker
113 ['CheckChangesHasContent'],
114 ['Git::Check' => {allow_dirty
=> [@allow_dirty], untracked_files
=> 'ignore'}],
116 # ['ConfirmRelease'],
117 $self->no_upload ? ['FakeRelease'] : ['UploadToCPAN'],
118 ['Git::Commit' => {allow_dirty
=> [@allow_dirty], commit_msg
=> 'Release %N %v%t%n%n%c'}],
119 ['Git::CommitBuild' => {branch
=> '', release_branch
=> 'dist', release_message
=> 'Version %v%t'}],
120 ['Git::Tag' => {tag_message
=> 'Version %v%t%n%n%c'}],
121 ['Git::Push' => {push_to
=> 'origin master +master:refs/heads/release +dist', remotes_must_exist
=> 0}],
125 if ($self->airplane) {
126 my %network_plugins = map { Dist
::Zilla
::Util-
>expand_config_package_name($_) => 1 } @network_plugins;
128 @plugins = grep { !$network_plugins{Dist
::Zilla
::Util-
>expand_config_package_name(ref eq 'ARRAY' ? $_->[0] : $_)} } @plugins;
129 push @plugins, 'BlockRelease';
132 push @plugins, 'ConfirmRelease';
134 $self->add_plugins(@plugins);
137 with
'Dist::Zilla::Role::PluginBundle::Easy';
138 with
'Dist::Zilla::Role::PluginBundle::PluginRemover';
139 with
'Dist::Zilla::Role::PluginBundle::Config::Slicer';
141 __PACKAGE__-
>meta->make_immutable;
152 Dist::Zilla::PluginBundle::Author::CCM - A plugin bundle for distributions built by CCM
160 # In your dist.ini file:
165 You probably don't want to use this.
178 exclude_filename = LICENSE
179 exclude_filename = README.md
189 [Prereqs::FromCPANfile] ; if a cpanfile exists in root
190 [Prereqs::AuthorDeps]
194 [Test::CPAN::Changes]
203 [Test::CleanNamespaces]
204 [Test::ReportPrereqs]
217 [MetaProvides::Package]
226 config_plugin = @Author::CCM
243 [MakeMaker] ; override with the "installer" attribute
246 [CheckChangesHasContent]
250 [UploadToCPAN] ; disable with the "no_upload" attribute
252 commit_msg = Release %N %v%t%n%n%c
255 release_branch = dist
256 release_message = Version %v%t
258 tag_message = Version %v%t%n%n%c
260 push_to = origin master +master:refs/heads/release +dist
261 remotes_must_exist = 0
267 Specify which installer to use, such as:
273 C<MakeMaker> (default)
283 Disable plugins that use the network, and prevent releasing.
287 Do not upload to CPAN.
293 Required by L<Dist::Zilla::Role::PluginBundle::Easy>.
305 L<Dist::Zilla::PluginBundle::Author::ETHER>
311 Please report any bugs or feature requests on the bugtracker website
312 L<https://github.com/chazmcgarvey/Dist-Zilla-PluginBundle-Author-CCM/issues>
314 When submitting a bug or request, please include a test-file or a
315 patch to an existing test-file that illustrates the bug or desired
320 Charles McGarvey <chazmcgarvey@brokenzipper.com>
322 =head1 COPYRIGHT AND LICENSE
324 This software is copyright (c) 2016 by Charles McGarvey.
326 This is free software; you can redistribute it and/or modify it under
327 the same terms as the Perl 5 programming language system itself.
This page took 0.054037 seconds and 3 git commands to generate.