]>
Dogcows Code - chaz/p5-Dist-Zilla-PluginBundle-Author-CCM/blob - lib/Dist/Zilla/PluginBundle/Author/CCM.pm
411f4ac9c5b9f07100f1de61d4af3487ccb64065
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.002'; # 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 },
36 default => sub { $ENV{DZIL_NO_UPLOAD
} // shift-
>payload->{no_upload
} // 0 },
43 if ($self->no_upload) {
44 print '[@Author::CCM] WARNING! WARNING! WARNING! *** You are in no_upload mode!! ***', "\n";
47 my @copy_from_build = qw(LICENSE);
48 my @network_plugins = qw(Git::Push Test::Pod::No404s UploadToCPAN);
49 my @gather_exclude = (@copy_from_build, qw(README.md));
50 my @gather_prune = qw(dist.ini);
51 my @no_index = qw(eg share shares t xt);
52 my @allow_dirty = (@copy_from_build, qw(.travis.yml Changes LICENSE README.md));
53 my @git_remotes = qw(github origin);
54 my @check_files = qw(:InstallModules :ExecFiles :TestFiles :ExtraTestFiles);
61 ['ReversionOnRelease' => {prompt
=> 1}],
64 ['Git::GatherDir' => {exclude_filename
=> [@gather_exclude]}],
66 ['PruneFiles' => {filename
=> [@gather_prune]}],
68 ['CopyFilesFromBuild' => {copy
=> [@copy_from_build]}],
73 -f
'cpanfile' ? ['Prereqs::FromCPANfile'] : (),
74 ['Prereqs::AuthorDeps'],
78 ['Test::CPAN::Changes'],
81 ['Test::Pod::No404s'],
83 ['Test::EOL' => {finder
=> [@check_files]}],
84 ['Test::NoTabs' => {finder
=> [@check_files]}],
85 ['Test::Perl::Critic'],
86 ['Test::Portability'],
87 ['Test::CleanNamespaces'],
88 ['Test::ReportPrereqs'],
91 ['Authority' => {do_munging
=> 0}],
94 ['MetaNoIndex' => {directory
=> [@no_index]}],
95 ['MetaProvides::Package'],
97 ['Git::Contributors' => {order_by
=> 'commits'}],
98 ['GithubMeta' => {remote
=> [@git_remotes], issues
=> 1}],
101 ['PodWeaver' => {config_plugin
=> '@Author::CCM'}],
102 ['OverridePkgVersion'],
106 ['ReadmeAnyFromPod' => 'repo readme' => {filename
=> 'README.md', location
=> 'root', type
=> 'markdown', phase
=> 'release'}],
107 ['ReadmeAnyFromPod' => 'dist readme' => {filename
=> 'README', location
=> 'build', type
=> 'text'}],
112 $self->installer, # e.g. MakeMaker
115 ['CheckChangesHasContent'],
116 ['Git::Check' => {allow_dirty
=> [@allow_dirty], untracked_files
=> 'ignore'}],
119 # ['ConfirmRelease'],
120 $self->no_upload ? ['FakeRelease'] : ['UploadToCPAN'],
121 ['Git::Commit' => {allow_dirty
=> [@allow_dirty], commit_msg
=> 'Release %N %v%t%n%n%c'}],
122 ['Git::CommitBuild' => {branch
=> '', release_branch
=> 'dist', release_message
=> 'Version %v%t'}],
123 ['Git::Tag' => {tag_message
=> 'Version %v%t%n%n%c'}],
124 $self->no_upload ? () : ['Git::Push' => {push_to
=> 'origin master +master:refs/heads/release +dist', remotes_must_exist
=> 0}],
128 if ($self->airplane) {
129 my %network_plugins = map { Dist
::Zilla
::Util-
>expand_config_package_name($_) => 1 } @network_plugins;
131 @plugins = grep { !$network_plugins{Dist
::Zilla
::Util-
>expand_config_package_name(ref eq 'ARRAY' ? $_->[0] : $_)} } @plugins;
132 push @plugins, 'BlockRelease';
135 push @plugins, 'ConfirmRelease';
137 $self->add_plugins(@plugins);
140 with
'Dist::Zilla::Role::PluginBundle::Easy';
141 with
'Dist::Zilla::Role::PluginBundle::PluginRemover';
142 with
'Dist::Zilla::Role::PluginBundle::Config::Slicer';
144 __PACKAGE__-
>meta->make_immutable;
155 Dist::Zilla::PluginBundle::Author::CCM - A plugin bundle for distributions built by CCM
163 # In your dist.ini file:
168 You probably don't want to use this.
178 exclude_filename = LICENSE
179 exclude_filename = README.md
190 [Prereqs::FromCPANfile] ; if a cpanfile exists in root
191 [Prereqs::AuthorDeps]
195 [Test::CPAN::Changes]
204 [Test::CleanNamespaces]
205 [Test::ReportPrereqs]
218 [MetaProvides::Package]
227 config_plugin = @Author::CCM
245 [MakeMaker] ; override with the "installer" attribute
248 [CheckChangesHasContent]
253 [UploadToCPAN] ; disable with the "no_upload" attribute
255 commit_msg = Release %N %v%t%n%n%c
258 release_branch = dist
259 release_message = Version %v%t
261 tag_message = Version %v%t%n%n%c
263 push_to = origin master +master:refs/heads/release +dist
264 remotes_must_exist = 0
270 Specify which installer to use, such as:
276 C<MakeMaker> (default)
286 Disable plugins that use the network, and prevent releasing.
290 Do not upload to CPAN or git push.
296 Required by L<Dist::Zilla::Role::PluginBundle::Easy>.
308 L<Dist::Zilla::PluginBundle::Author::ETHER>
314 Please report any bugs or feature requests on the bugtracker website
315 L<https://github.com/chazmcgarvey/Dist-Zilla-PluginBundle-Author-CCM/issues>
317 When submitting a bug or request, please include a test-file or a
318 patch to an existing test-file that illustrates the bug or desired
323 Charles McGarvey <chazmcgarvey@brokenzipper.com>
325 =head1 COPYRIGHT AND LICENSE
327 This software is copyright (c) 2016 by Charles McGarvey.
329 This is free software; you can redistribute it and/or modify it under
330 the same terms as the Perl 5 programming language system itself.
This page took 0.055312 seconds and 3 git commands to generate.