App-Changelord
view release on metacpan or search on metacpan
lib/App/Changelord/Command/Add.pm view on Meta::CPAN
my $version = $self->next_release;
push $version->{changes}->@*, {
maybe type => $self->type,
maybe ticket => $self->ticket,
desc => join ' ', @ARGV,
};
$self->save_changelog;
say "change added to the changelog";
}
'end of App::Changelog::Command::Add';
__END__
=pod
=encoding UTF-8
lib/App/Changelord/Command/Bump.pm view on Meta::CPAN
name homepage
/, sort keys $change->{project}->%*
] );
for ( grep { ref } $change->{releases}->@* ) {
Bless($_)->keys( [ uniq qw/ version date changes /, sort keys %$_ ] );
}
path( $self->source )->spew( YAML::Dump($change) );
say "new version minted: $version";
}
'end of App::Changelog::Command::Bump';
__END__
=pod
=encoding UTF-8
lib/App/Changelord/Command/GitGather.pm view on Meta::CPAN
}
sub save_changelog($self) {
my $src = $self->source;
path($src)->spew( App::Changelord::Command::Init::serialize_changelog($self) );
}
sub run ($self) {
say "let's check those git logs...";
# figure out lower bound
my $from = $self->lower_bound;
say "checking since ", ( $from || 'the dawn of time' );
my @messages = map { $self->munge_message($_) } $self->get_commits($from);
unless(@messages) {
say "\nno change detected";
return;
}
print "\n";
say " * ", $_->{desc} for @messages;
print "\n";
push $self->next_release->{changes}->@*, @messages;
$self->save_changelog;
say $self->source, " updated";
}
1;
__END__
=pod
=encoding UTF-8
lib/App/Changelord/Command/Init.pm view on Meta::CPAN
ticket_url => undef,
commit_regex => q/^(?<type>[^: ]+):(?<desc>.*?)(\[(?<ticket>[^\]]+)\])?$/,
},
change_types => $self->change_types,
releases => [
{ version => 'NEXT', changes => [] }
]
};
path($src)->spew( $self->serialize_changelog($change) );
say "file '$src' created, enjoy!";
}
'end of App::Changelog::Command::Init';
__END__
=pod
=encoding UTF-8
lib/App/Changelord/Command/Validate.pm view on Meta::CPAN
my $schema = path(__FILE__)->sibling('changelog-schema.yml')->slurp;
my $result = JSON::Schema::Modern->new(
output_format => 'detailed',
)->evaluate(
$self->changelog,
YAML::XS::Load($schema),
);
return say "woo, changelog is valid!" if( $result eq 'valid' );
print $result;
die "\n";
}
'end of App::Changelog::Command::Validate';
__END__
lib/App/Changelord/Command/Version.pm view on Meta::CPAN
with 'App::Changelord::Role::ChangeTypes';
with 'App::Changelord::Role::Versions';
sub run($self) {
my $param = shift @ARGV;
die "invalid parameter '$param', needs to be nothing, 'next' or 'latest'\n"
if $param and not grep { $param eq $_ } qw/ next latest /;
if(!$param) {
say "latest version: ", $self->latest_version;
say "next version: ", $self->next_version;
}
elsif( $param eq 'next' ) {
say $self->next_version;
}
else {
say $self->latest_version;
}
}
'end of App::Changelog::Command::Version';
__END__
=pod
=encoding UTF-8
( run in 2.826 seconds using v1.01-cache-2.11-cpan-6736b670a1e )