blib/lib/Dist/Zilla/PluginBundle/Author/AMON.pm

filter: Statementstmt 62.5% 115 / 184 Branchbran 0.0% 0 / 8 Conditioncond 0.0% 0 / 15 MC/DCmcdc 0.0% 0 / 8 Subroutinesub 66.6% 34 / 51 Podpod 80.0% 8 / 10 totaltotal 56.8% 157 / 276 CC 12 SCAR 11.3
CC
12
Cov
56%
configure_meta
12.0
__ANON__
6.0
__ANON__
6.0
CRAP 3.1
↑ Summary
1 package Dist::Zilla::PluginBundle::Author::AMON;
2 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 ## no critic
7 1 our $VERSION = '0.000001';
8 1 $VERSION = eval $VERSION;
9 ## use critic
10  
11 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 1 with 'Dist::Zilla::Role::PluginBundle::Easy';
13  
14 # configure_meta
15 1 ▶use Dist::Zilla::Plugin::GithubMeta;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 # configure_prereqs
17 1 ▶use Dist::Zilla::Plugin::Prereqs::AuthorDeps;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 # configure_gather
19 1 ▶use Dist::Zilla::Plugin::Git::GatherDir;
Subroutine BEGIN: called CC=1 SCAR=0.0
20 1 ▶use Dist::Zilla::Plugin::PruneCruft;
Subroutine BEGIN: called CC=1 SCAR=0.0
21 # configure_extra_files
22 1 ▶use Dist::Zilla::Plugin::CPANFile;
Subroutine BEGIN: called CC=1 SCAR=0.0
23 1 ▶use Dist::Zilla::Plugin::MetaYAML;
Subroutine BEGIN: called CC=1 SCAR=0.0
24 1 ▶use Dist::Zilla::Plugin::MetaJSON;
Subroutine BEGIN: called CC=1 SCAR=0.0
25 1 ▶use Dist::Zilla::Plugin::MetaProvides::Package;
Subroutine BEGIN: called CC=1 SCAR=0.0
26 1 ▶use Dist::Zilla::Plugin::Manifest;
Subroutine BEGIN: called CC=1 SCAR=0.0
27 1 ▶use Dist::Zilla::Plugin::License;
Subroutine BEGIN: called CC=1 SCAR=0.0
28 1 ▶use Dist::Zilla::Plugin::Readme;
Subroutine BEGIN: called CC=1 SCAR=0.0
29 1 ▶use Dist::Zilla::Plugin::PPPort;
Subroutine BEGIN: called CC=1 SCAR=0.0
30 # configure_extra_tests
31 1 ▶use Dist::Zilla::Plugin::Test::Perl::Critic;
Subroutine BEGIN: called CC=1 SCAR=0.0
32 1 ▶use Dist::Zilla::Plugin::PodSyntaxTests;
Subroutine BEGIN: called CC=1 SCAR=0.0
33 1 ▶use Dist::Zilla::Plugin::PodCoverageTests;
Subroutine BEGIN: called CC=1 SCAR=0.0
34 1 ▶use Dist::Zilla::Plugin::Test::Kwalitee::Extra;
Subroutine BEGIN: called CC=1 SCAR=0.0
35 1 ▶use Dist::Zilla::Plugin::RunExtraTests;
Subroutine BEGIN: called CC=1 SCAR=0.0
36 # configure_post_build
37 1 ▶use Dist::Zilla::Plugin::CopyFilesFromBuild;
Subroutine BEGIN: called CC=1 SCAR=0.0
38 1 ▶use Dist::Zilla::Plugin::ReadmeAnyFromPod;
Subroutine BEGIN: called CC=1 SCAR=0.0
39 # configure_pre_release
40 1 ▶use Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch;
Subroutine BEGIN: called CC=1 SCAR=0.0
41 1 ▶use Dist::Zilla::Plugin::Git::Check;
Subroutine BEGIN: called CC=1 SCAR=0.0
42 1 ▶use Dist::Zilla::Plugin::CheckChangesHasContent;
Subroutine BEGIN: called CC=1 SCAR=0.0
43 1 ▶use Dist::Zilla::Plugin::CheckVersionIncrement;
Subroutine BEGIN: called CC=1 SCAR=0.0
44 # configure_release
45 1 ▶use Dist::Zilla::Plugin::TestRelease;
Subroutine BEGIN: called CC=1 SCAR=0.0
46 1 ▶use Dist::Zilla::Plugin::ConfirmRelease;
Subroutine BEGIN: called CC=1 SCAR=0.0
47 1 ▶use Dist::Zilla::Plugin::UploadToCPAN;
Subroutine BEGIN: called CC=1 SCAR=0.0
48 # configure_post_release
49 1 ▶use Dist::Zilla::Plugin::NextRelease;
Subroutine BEGIN: called CC=1 SCAR=0.0
50 1 ▶use Dist::Zilla::Plugin::Git::Commit;
Subroutine BEGIN: called CC=1 SCAR=0.0
51 1 ▶use Dist::Zilla::Plugin::Git::Tag;
Subroutine BEGIN: called CC=1 SCAR=0.0
52 1 ▶use Dist::Zilla::Plugin::Git::Push;
Subroutine BEGIN: called CC=1 SCAR=0.0
53  
54 =encoding UTF-8
55  
56 =head1 NAME
57  
58 Dist::Zilla::PluginBundle::Author::AMON - dzil config choices by AMON
59  
60 =head1 SYNOPSIS
61  
62 # in dist.ini
63 [@Author::AMON]
64 github = example-user/example-repo
65 autogenerate_file = Build.PL
66 ; github_issues = 1
67 ; exclude_author_deps = inc::Example
68 ; gather_exclude_file = TODO.txt
69 ; gather_exclude_match = ^scripts/
70 ; ppport = src/ppport.h
71  
72 =head1 DESCRIPTION
73  
74 This module contains a starting point for AMON's dist.ini.
75 There are a couple of more or less sensible defaults
76 (like pointing metadata at Github, or only gathering files tracked by Git)
77 and a number of valuable checks so that I mess up fewer CPAN releases
78 (like checking that the Changes file was updated.)
79 There are also a few convenience features
80 (like not gathering files that will be generated by the build process.)
81  
82 Decisions not currently made by this module:
83  
84 Which build system to use (e.g. Module::Build vs. MakeMaker).
85  
86 How the version number is managed
87 (e.g. taken from the module with [VersionFromMainModule]).
88  
89 How prereqs are found. Simply using [AutoPrereqs] is likely to be correct.
90  
91 All this may change in a future release without prior notice,
92 and will not be seen as a backwards-incompatible change.
93  
94 =head1 CONFIGURATION
95  
96 =cut
97  
98 0 ▶sub mvp_multivalue_args {
Subroutine mvp_multivalue_args: not called CC=1 SCAR=6.9
Pod undocumented
99 0 return qw/
100 exclude_author_deps
101 autogenerate_file
102 gather_exclude_file
103 gather_exclude_match
104 /;
105 }
106  
107 =head2 github
108  
109 The name of a GitHub repository in the format C<< <user>/<repo> >>.
110 This is used to set the repo and user fields in
111 L<[GithubMeta]|Dist::Zilla::Plugin::GithubMeta>.
112  
113 Required string.
114  
115 =cut
116  
117 has github => (
118 is => 'ro',
119 isa => 'Str',
120 lazy => 1,
121 0 ▶ default => sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
122 return delete shift->payload->{github}
123 0 ▶ // die q(Github repo required);
Condition0%0/2
delete +(shift())->payload->{"github"} // die("Github repo required")
l!l
00
MC/DC0%0/1
delete +(shift())->payload->{"github"} // die("Github repo required")
delete +(shift())->payload->{"github"}
Truth table0%0/2
A
A= delete +(shift())->payload->{"github"}
Aresult
11
00
124 },
125 1 );
126  
127 =head2 github_issues
128  
129 Whether Github Issues should be used as the bugtracker.
130 If not, bugtracker info needs to be added manually.
131  
132 Optional boolean. Defaults to true.
133  
134 =cut
135  
136 has github_issues => (
137 is => 'ro',
138 isa => 'Bool',
139 lazy => 1,
140 0 ▶ default => sub { delete shift->payload->{github_issues} // 1 },
Subroutine __ANON__: not called CC=2 SCAR=17.9
Condition0%0/2
delete +(shift())->payload->{"github_issues"} // 1
l!l
00
MC/DC0%0/1
delete +(shift())->payload->{"github_issues"} // 1
delete +(shift())->payload->{"github_issues"}
Truth table0%0/2
A
A= delete +(shift())->payload->{"github_issues"}
Aresult
11
00
141 1 );
142  
143 =head2 exclude_author_deps
144  
145 Exclude authordeps prereqs.
146 This module will add your "dzil authordeps" via
147 L<[Prereqs::AuthorDeps]|Dist::Zilla::Plugin::Prereqs::AuthorDeps>.
148 List any modules that should not be required,
149 e.g. because they are bundled as "inc/" modules.
150  
151 Optional string. Can be specified multiple times. Defaults to empty list.
152  
153 =cut
154  
155 has exclude_author_deps => (
156 is => 'ro',
157 isa => 'ArrayRef[Str]',
158 lazy => 1,
159 0 ▶ default => sub { delete shift->payload->{exclude_author_deps} // [] },
Subroutine __ANON__: not called CC=2 SCAR=17.9
Condition0%0/2
delete +(shift())->payload->{"exclude_author_deps"} // []
l!l
00
MC/DC0%0/1
delete +(shift())->payload->{"exclude_author_deps"} // []
delete +(shift())->payload->{"exclude_author_deps"}
Truth table0%0/2
A
A= delete +(shift())->payload->{"exclude_author_deps"}
Aresult
11
00
160 1 );
161  
162 =head2 gather_exclude_file
163  
164 Filenames that should not be gathered.
165 Use L<gather_exclude_match|/gather_exclude_match>
166 to exclude all files matching a pattern, e.g. a whole directory.
167 Use L<autogenerate_file|/autogenerate_file>
168 to exclude files that will be copied from the built dist.
169  
170 Optional string. Can be specified multiple times. Defaults to empty list.
171  
172 =cut
173  
174 has gather_exclude_file => (
175 is => 'ro',
176 isa => 'ArrayRef[Str]',
177 lazy => 1,
178 0 ▶ default => sub { delete shift->payload->{gather_exclude_file} // [] },
Subroutine __ANON__: not called CC=2 SCAR=17.9
Condition0%0/2
delete +(shift())->payload->{"gather_exclude_file"} // []
l!l
00
MC/DC0%0/1
delete +(shift())->payload->{"gather_exclude_file"} // []
delete +(shift())->payload->{"gather_exclude_file"}
Truth table0%0/2
A
A= delete +(shift())->payload->{"gather_exclude_file"}
Aresult
11
00
179 1 );
180  
181 =head2 gather_exclude_match
182  
183 A regex to match filenames that should not be gathered.
184 Use L<gather_exclude_file|/gather_exclude_file>
185 to exclude single files.
186 Use L<autogenerate_file|/autogenerate_file>
187 to exclude files that will be copied from the built dist.
188  
189 Optional string. Can be specified multiple times. Defaults to empty list.
190  
191 =cut
192  
193 has gather_exclude_match => (
194 is => 'ro',
195 isa => 'ArrayRef[Str]',
196 lazy => 1,
197 0 ▶ default => sub { delete shift->payload->{gather_exclude_match} // [] },
Subroutine __ANON__: not called CC=2 SCAR=17.9
Condition0%0/2
delete +(shift())->payload->{"gather_exclude_match"} // []
l!l
00
MC/DC0%0/1
delete +(shift())->payload->{"gather_exclude_match"} // []
delete +(shift())->payload->{"gather_exclude_match"}
Truth table0%0/2
A
A= delete +(shift())->payload->{"gather_exclude_match"}
Aresult
11
00
198 1 );
199  
200 =head2 autogenerate_file
201  
202 Files that should be copied from the built dist.
203 These won't be gathered.
204 After the build phase, they will be copied into your source tree.
205 Use L<gather_exclude_file|/gather_exclude_file>
206 or L<gather_exclude_match|/gather_exclude_match>
207 to exclude files, without copying them from the built dist.
208  
209 The following files will be copied or autogenerated
210 without having to add them to this configuration option:
211  
212 =over
213  
214 =item *
215  
216 C<LICENSE> as generated by the [License] plugin.
217  
218 =item *
219  
220 C<cpanfile> as generated by the [CPANFile] plugin.
221  
222 =item *
223  
224 C<README.md> as generated by the [ReadmeAnyFromPod] plugin.
225  
226 =item *
227  
228 C<ppport.h> if specified (see the L<ppport|/ppport> option).
229  
230 =back
231  
232 Optional string. Can be specified multiple times. Defaults to empty list.
233  
234 =cut
235  
236 1 my @always_autogenerate = qw(
237 LICENSE cpanfile README.md
238 );
239  
240 has autogenerate_file => (
241 is => 'ro',
242 isa => 'ArrayRef[Str]',
243 lazy => 1,
244 0 ▶ default => sub { delete shift->payload->{autogenerate_file} // [] },
Subroutine __ANON__: not called CC=2 SCAR=17.9
Condition0%0/2
delete +(shift())->payload->{"autogenerate_file"} // []
l!l
00
MC/DC0%0/1
delete +(shift())->payload->{"autogenerate_file"} // []
delete +(shift())->payload->{"autogenerate_file"}
Truth table0%0/2
A
A= delete +(shift())->payload->{"autogenerate_file"}
Aresult
11
00
245 1 );
246  
247 =head2 ppport
248  
249 Add a ppport.h file under the specified path.
250 The value of this option is the path/filename
251 where the ppport.h should be placed.
252 E.g.:
253  
254 ...
255 ppport = src/ppport.h
256  
257 Optional string or undef. Defaults to undef.
258  
259 =cut
260  
261 has ppport => (
262 is => 'ro',
263 isa => 'Maybe[Str]',
264 lazy => 1,
265 0 ▶ default => sub { delete shift->payload->{ppport} },
Subroutine __ANON__: not called CC=1 SCAR=6.9
266 1 );
267  
268 =head1 PLUGINS
269  
270 The plugins are configured in thematic groups.
271 Each group is a method that can be overridden in subclasses of this bundle.
272  
273 =over
274  
275 =item *
276  
277 L<configure_meta|/configure_meta>
278  
279 =item *
280  
281 L<configure_prereqs|/configure_prereqs>
282  
283 =item *
284  
285 L<configure_gather|/configure_gather>
286  
287 =item *
288  
289 L<configure_extra_files|/configure_extra_files>
290  
291 =item *
292  
293 L<configure_extra_tests|/configure_extra_tests>
294  
295 =item *
296  
297 L<configure_post_build|/configure_post_build>
298  
299 =item *
300  
301 L<configure_pre_release|/configure_pre_release>
302  
303 =item *
304  
305 (configure_release)
306  
307 A minimum release workflow is hardcoded:
308  
309 [TestRelease]
310 [ConfirmRelease]
311 [UploadToCPAN]
312  
313 =item *
314  
315 L<configure_post_release|/configure_post_release>
316  
317 =back
318  
319 =cut
320  
321 0 ▶sub configure {
Subroutine configure: not called CC=1 SCAR=6.9
Pod undocumented
322 0 my ($self) = @_;
323  
324 0 $self->configure_meta();
325 0 $self->configure_prereqs();
326 0 $self->configure_gather();
327 0 $self->configure_extra_files();
328 0 $self->configure_extra_tests();
329 0 $self->configure_post_build();
330 0 $self->configure_pre_release();
331 0 $self->add_plugins(qw(
332 TestRelease
333 ConfirmRelease
334 UploadToCPAN
335 ));
336 0 $self->configure_post_release();
337  
338 0 return;
339 }
340  
341 =head2 configure_meta
342  
343 Add metadata.
344  
345 [GithubMeta]
346 user = {{github.user}}
347 repo = {{github.repo}}
348 issues = {{github_issues}}
349  
350 Plugins:
351 L<GithubMeta|Dist::Zilla::Plugin::GithubMeta>.
352  
353 Configuration options:
354 L<github|/github>,
355 L<github_issues|/github_issues>.
356  
357 =cut
358  
359 0 ▶sub configure_meta {
Subroutine configure_meta: not called CC=3 SCAR=24.8
Pod documented
360 0 my ($self) = @_;
361  
362 0 my ($gh_user, $gh_repo) = split m(/), scalar $self->github, 2;
363 0 ▶ unless (length $gh_user and length $gh_repo) {
Branch: 1 branch
BranchTrueFalseTotal
unless (length $gh_user and length $gh_repo) 0 0 0
Condition0%0/3
length $gh_user and length $gh_repo
!ll&&!rl&&r
000
MC/DC0%0/2
length $gh_user and length $gh_repo
length $gh_user length $gh_repo
Truth table0%0/3
A and B
A= length $gh_userB= length $gh_repo
ABresult
0X0
100
111
364 0 die "Github repo of the form <user>/<repo> required!";
365 }
366  
367 $self->add_plugins(
368 0 [GithubMeta => {
369 repo => $gh_repo,
370 user => $gh_user,
371 issues => $self->github_issues }],
372 );
373  
374 0 return;
375 }
376  
377 =head2 configure_prereqs
378  
379 Specify prerequisites.
380  
381 [Prereqs::AuthorDeps]
382 ; exclude = {{exclude_author_deps}}
383  
384 Plugins:
385 L<Prereqs::AuthorDeps|Dist::Zilla::Plugin::Prereqs::AuthorDeps>.
386  
387 Configuration options:
388 L<exclude_author_deps|/exclude_author_deps>.
389  
390 =cut
391  
392 0 ▶sub configure_prereqs {
Subroutine configure_prereqs: not called CC=1 SCAR=6.9
Pod documented
393 0 my ($self) = @_;
394  
395 0 my @exclude_author_deps;
396 0 push @exclude_author_deps, @{ $self->exclude_author_deps };
397  
398 0 $self->add_plugins(
399 ['Prereqs::AuthorDeps' => {
400 (exclude => [ @exclude_author_deps ]) x!! @exclude_author_deps }],
401 );
402  
403 0 return;
404 }
405  
406 =head2 configure_gather
407  
408 Gather files to be included in the dist.
409  
410 [Git::GatherDir]
411 ; exclude_match = {{gather_exclude_match}}
412 ; exclude_filename = {{gather_exclude_file}}
413 ; exclude_filename = {{autogenerate_file}}
414 ; exclude_filename = {{ppport}}
415 [PruneCruft]
416  
417 Plugins:
418 L<Git::GatherDir|Dist::Zilla::Plugin::Git::GatherDir>,
419 L<PruneCruft|Dist::Zilla::Plugin::PruneCruft>.
420  
421 Configuration options:
422 L<gather_exclude_file|/gather_exclude_file>,
423 L<gather_exclude_match|/gather_exclude_match>,
424 L<autogenerate_file|/autogenerate_file>,
425 L<ppport|/ppport>.
426  
427 =cut
428  
429 0 ▶sub configure_gather {
Subroutine configure_gather: not called CC=2 SCAR=17.9
Pod documented
430 0 my ($self) = @_;
431  
432 0 my @exclude_file;
433 0 push @exclude_file, @always_autogenerate;
434 0 push @exclude_file, @{ $self->autogenerate_file };
435 0 push @exclude_file, @{ $self->gather_exclude_file };
436 0 ▶ push @exclude_file, $self->ppport if $self->ppport;
Branch: 1 branch
BranchTrueFalseTotal
if $self->ppport 0 0 0
437  
438 0 my @exclude_match;
439 0 push @exclude_match, @{ $self->gather_exclude_match };
440  
441 0 $self->add_plugins(
442 ['Git::GatherDir' => {
443 (exclude_filename => [ @exclude_file ]) x!! @exclude_file,
444 (exclude_match => [ @exclude_match ]) x!! @exclude_match }],
445 'PruneCruft',
446 );
447  
448 0 return;
449 }
450  
451 =head2 configure_extra_files
452  
453 Autogenerate certain files in the dist.
454  
455 ; [NextRelease]
456 [CPANFile]
457 [MetaYAML]
458 [MetaJSON]
459 [MetaProvides::Package]
460 [Manifest]
461 [License]
462 [Readme]
463 ; [PPPort]
464 ; filename = {{ppport}}
465  
466 Plugins:
467 L<[CPANFile]|Dist::Zilla::Plugin::CPANFile>,
468 L<[MetaYAML]|Dist::Zilla::Plugin::MetaYAML>,
469 L<[MetaJSON]|Dist::Zilla::Plugin::MetaJSON>,
470 L<[MetaProvides::Package]|Dist::Zilla::Plugin::MetaProvides::Package>,
471 L<[Manifest]|Dist::Zilla::Plugin::Manifest>,
472 L<[License]|Dist::Zilla::Plugin::License>,
473 L<[Readme]|Dist::Zilla::Plugin::Readme>,
474 L<[PPPort]|Dist::Zilla::Plugin::PPPort>.
475  
476 Configuration options:
477 L<ppport|/ppport>.
478  
479 =cut
480  
481 0 ▶sub configure_extra_files {
Subroutine configure_extra_files: not called CC=2 SCAR=17.9
Pod documented
482 0 my ($self) = @_;
483  
484 # also NextRelease, but that must be specified later
485 0 $self->add_plugins(qw(
486 CPANFile
487 MetaYAML
488 MetaJSON
489 MetaProvides::Package
490 Manifest
491 License
492 Readme
493 ));
494  
495 0 ▶ if (my $ppport = $self->ppport) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $ppport = $self->ppport) 0 0 0
496 0 $self->add_plugins(
497 ['PPPort' => {
498 filename => $ppport }],
499 );
500 }
501  
502 0 return;
503 }
504  
505 =head2 configure_extra_tests
506  
507 Add extra tests, particularly author tests focussed on release quality.
508  
509 [Test::Perl::Critic]
510 [PodSyntaxTests]
511 [PodCoverageTests]
512 [Test::Kwalitee::Extra]
513 [RunExtraTests]
514  
515 Plugins:
516 L<[Test::Perl::Critic]|Dist::Zilla::Plugin::Test::Perl::Critic>,
517 L<[PodSyntaxTests]|Dist::Zilla::Plugin::PodSyntaxTests>,
518 L<[PodCoverageTests]|Dist::Zilla::Plugin::PodCoverageTests>,
519 L<[Test::Kwalitee::Extra]|Dist::Zilla::Plugin::Test::Kwalitee::Extra>,
520 L<[RunExtraTests]|Dist::Zilla::Plugin::RunExtraTests>.
521  
522 =cut
523  
524 0 ▶sub configure_extra_tests {
Subroutine configure_extra_tests: not called CC=1 SCAR=6.9
Pod documented
525 0 my ($self) = @_;
526  
527 0 $self->add_plugins(qw(
528 Test::Perl::Critic
529 PodSyntaxTests
530 PodCoverageTests
531 Test::Kwalitee::Extra
532 RunExtraTests
533 ));
534  
535 0 return;
536 }
537  
538 =head2 configure_post_build
539  
540 Post-build actions, such as copying generated files into the source tree.
541  
542 [CopyFilesFromBuild
543 copy = {{autogenerate_file}}
544 ; copy = {{ppport}}
545 [ReadmeAnyFromPod]
546 type = markdown
547 filename = README.md
548 location = root
549 phase = build
550  
551 Plugins:
552 L<[CopyFilesFromBuild]|Dist::Zilla::Plugin::CopyFilesFromBuild>,
553 L<[ReadmeAnyFromPod]|Dist::Zilla::Plugin::ReadmeAnyFromPod]>.
554  
555 Configuration options:
556 L<autogenerate_file|/autogenerate_file>,
557 L<ppport|/ppport>.
558  
559 =cut
560  
561 0 ▶sub configure_post_build {
Subroutine configure_post_build: not called CC=2 SCAR=17.9
Pod documented
562 0 my ($self) = @_;
563  
564 # Copy Generated Files
565  
566 0 my @copy_from_build;
567 0 push @copy_from_build, grep { $_ ne 'README.md' } @always_autogenerate;
568 0 push @copy_from_build, @{ $self->autogenerate_file };
569 0 ▶ push @copy_from_build, $self->ppport if $self->ppport;
Branch: 1 branch
BranchTrueFalseTotal
if $self->ppport 0 0 0
570  
571 0 $self->add_plugins(
572 [CopyFilesFromBuild => {
573 copy => [ @copy_from_build ] }],
574 );
575  
576 # Generate markdown README from main module
577 0 $self->add_plugins(
578 [ReadmeAnyFromPod => {
579 type => 'markdown',
580 filename => 'README.md',
581 location => 'root',
582 phase => 'build' }],
583 );
584  
585 0 return;
586 }
587  
588 =head2 configure_pre_release
589  
590 Run pre-release checks.
591  
592 [Git::CheckFor::CorrectBranch]
593 [Git::Check]
594 [CheckChangesHasContent]
595 [CheckVersionIncrement]
596  
597 Plugins:
598 L<[Git::CheckFor::CorrectBranch]|Dist::Zilla::Plugin::Git::CheckFor::CorrectBranch>,
599 L<[Git::Check]|Dist::Zilla::Plugin::Git::Check>,
600 L<[CheckChangesHasContent]|Dist::Zilla::Plugin::CheckChangesHasContent>,
601 L<[CheckVersionIncrement]|Dist::Zilla::Plugin::CheckVersionIncrement>.
602  
603 =cut
604  
605 0 ▶sub configure_pre_release {
Subroutine configure_pre_release: not called CC=1 SCAR=6.9
Pod documented
606 0 my ($self) = @_;
607  
608 0 $self->add_plugins(qw(
609 Git::CheckFor::CorrectBranch
610 Git::Check
611 CheckChangesHasContent
612 CheckVersionIncrement
613 ));
614  
615 0 return;
616 }
617  
618 =head2 configure_post_release
619  
620 Perform post-release bookkeeping.
621  
622 [NextRelease]
623 time_zone = UTC
624 [Git::Commit]
625 commit_msg = release-%v
626 [Git::Tag]
627 tag_format = release-%v
628 tag_message = release-%v
629 [Git::Push]
630  
631 Plugins:
632 L<[NextRelease]|Dist::Zilla::Plugin::NextRelease>,
633 L<[Git::Commit]|Dist::Zilla::Plugin::Git::Commit>,
634 L<[Git::Tag]|Dist::Zilla::Plugin::Git::Tag>,
635 L<[Git::Push]|Dist::Zilla::Plugin::Git::Push>.
636  
637 =cut
638  
639 0 ▶sub configure_post_release {
Subroutine configure_post_release: not called CC=1 SCAR=6.9
Pod documented
640 0 my ($self) = @_;
641  
642 0 my $tag_format = 'release-%v';
643  
644 0 $self->add_plugins(
645 [NextRelease => {
646 time_zone => 'UTC' }],
647 ['Git::Commit' => {
648 commit_msg => $tag_format }],
649 ['Git::Tag' => {
650 tag_format => $tag_format,
651 tag_message => $tag_format }],
652 'Git::Push',
653 );
654  
655 0 return;
656 }
657  
658 =head1 SUPPORT
659  
660 Homepage:
661 L<https://github.com/latk/p5-Dist-Zilla-PluginBundle-Author-AMON>
662  
663 Bugtracker:
664 L<https://github.com/latk/p5-Dist-Zilla-PluginBundle-Author-AMON/issues>
665  
666 =head1 AUTHOR
667  
668 amon - Lukas Atkinson (cpan: AMON) <amon@cpan.org>
669  
670 =head1 COPYRIGHT
671  
672 Copyright 2017 Lukas Atkinson
673  
674 This library is free software and may be distributed under the same terms as perl itself. See L<http://dev.perl.org/licenses/>.
675  
676 =begin Pod::Coverage
677  
678 mvp_multivalue_args
679 configure
680  
681 =end Pod::Coverage
682  
683 =cut
684  
685 1 __PACKAGE__->meta->make_immutable;
686  
687 1 1;
↑ Summary