docs for ::GitGather
This commit is contained in:
parent
364ad6d587
commit
0fa5f2a9a4
@ -41,10 +41,7 @@ END_POD
|
||||
use Path::Tiny;
|
||||
use Git::Repository;
|
||||
|
||||
has changelog => ( is => 'lazy' );
|
||||
|
||||
sub _build_changelog ($self) { $self->parent_command->changelog }
|
||||
|
||||
with 'App::Changelord::Role::Changelog';
|
||||
with 'App::Changelord::Role::Versions';
|
||||
with 'App::Changelord::Role::ChangeTypes';
|
||||
|
||||
@ -69,7 +66,7 @@ sub _build_commit_regex($self) {
|
||||
|
||||
sub lower_bound($self) {
|
||||
# either the most recent commit in the current release
|
||||
my @sha1s = grep { $_ } map { $_->{commit} } $self->next_release->{changes}->@*;
|
||||
my @sha1s = grep { $_ } map { $_->{commit} } grep { ref } $self->next_release->{changes}->@*;
|
||||
|
||||
return pop @sha1s if @sha1s;
|
||||
|
||||
@ -92,7 +89,7 @@ sub munge_message($self,$message) {
|
||||
}
|
||||
|
||||
sub save_changelog($self) {
|
||||
my $src = $self->parent_command->source;
|
||||
my $src = $self->source;
|
||||
|
||||
path($src)->spew( App::Changelord::Command::Init::serialize_changelog($self) );
|
||||
}
|
||||
@ -104,7 +101,7 @@ sub run ($self) {
|
||||
# figure out lower bound
|
||||
my $from = $self->lower_bound;
|
||||
|
||||
say "checking from ", ( $from || 'the dawn of time' ), " on";
|
||||
say "checking since ", ( $from || 'the dawn of time' );
|
||||
|
||||
my @messages = map { $self->munge_message($_) } $self->get_commits($from);
|
||||
|
||||
@ -121,7 +118,7 @@ sub run ($self) {
|
||||
|
||||
$self->save_changelog;
|
||||
|
||||
say $self->parent_command->source, " updated";
|
||||
say $self->source, " updated";
|
||||
}
|
||||
|
||||
1;
|
||||
|
Loading…
Reference in New Issue
Block a user