App-BatchRelease
view release on metacpan or search on metacpan
lib/App/BatchRelease.pm view on Meta::CPAN
my @lines = ( q{}, 'Summary', sprintf( 'Released (%d):', scalar @$released ) );
push @lines, map { my $entry = $_; " $entry->{name} " . version_of($entry) } @$released;
push @lines, sprintf( 'Skipped (%d):', scalar @$skipped );
push @lines, map { my $entry = $_; ' ' . label($entry) . ": $entry->{skip}" } @$skipped;
push @lines, sprintf( 'Failed (%d):', scalar @$failed );
push @lines, map { my $entry = $_; ' ' . label($entry) . ": $entry->{error}" } @$failed;
return join q{}, map { "$_\n" } @lines;
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
App::BatchRelease - Release, in one run, every Dist::Zilla distribution of a set of checkouts whose work is not all on CPAN
=head1 VERSION
version 0.001
=head1 SYNOPSIS
use 5.040;
use App::BatchRelease;
exit App::BatchRelease->new->run( qw{--author TESTER --dry-run}, '/bogus/Foo-Bar', '/bogus/Foo-Baz' );
=head1 DESCRIPTION
This is the program C<cpan-batch-release>. Its POD says how a person uses it.
This page says what each part does, for a caller and for a test.
A run has five steps:
=over
=item 1. L</plan>
Fetches each checkout and looks at it, and sorts them into the ones to
release, in order, and the ones to skip, each with its reason. It changes no
work tree, unless L</pull_latest> is set and this is not a dry run.
=item 2. L</check_all>
Runs the release tests of each distribution to release, in order, and skips
each one whose tests fail, and each one that requires it. A dry run runs
them too.
=item 3. L</listing>
Prints both lists. A dry run stops here.
=item 4. L</confirm>, then the credentials
Asks the person to confirm the list, then asks for the PAUSE username and
password, once, through L<App::BatchRelease::Credentials>. Both happen
before the first release.
=item 5. L</release_all>
Releases each distribution of the list, in order, through
L<App::BatchRelease::Release>, skips each one that requires a distribution
whose release failed, and prints the summary.
=back
=head1 ATTRIBUTES
=head2 cpan
The client of MetaCPAN. Default an L<App::BatchRelease::MetaCPAN>.
=head2 credentials
The L<App::BatchRelease::Credentials>.
=head2 dry_run
True to stop after the list. Then nothing reads standard input, nothing
asks for credentials, and L</pull_latest> changes no checkout. The fetch of
L</sync> and the release tests of L</check_all> still run.
=head2 conformant_only
True to skip each distribution that is not in full conformance, as
L</conformance_problem> says.
=head2 yes
True to release without asking for confirmation.
=head2 check_login
True, the default, to check the credentials with PAUSE before the first
build. See L<App::BatchRelease::Credentials/check_with_pause>.
=head2 pull_latest
True to bring each checkout up to its upstream before the other checks: to
check out the default branch, and to fast-forward it with C<git pull
--ff-only>, as L</sync> says. On a dry run, it only says what it would do.
Default false, and then a checkout whose default branch is behind its
upstream is skipped.
=head2 jobs
How many checkouts L</inspect_all> inspects at once. Default 8. 1 inspects
them one after another, in this process.
=head2 authors
An array reference of the PAUSE IDs whose distributions this run releases,
in capitals. L</inspect> skips a checkout whose newest release on CPAN
another author uploaded, because that checkout is a fork. L</run> refuses
to start without one. Default none, and then every distribution on CPAN is
somebody else's.
( run in 1.234 second using v1.01-cache-2.11-cpan-f5f21f1076c )