doc for ::Add

This commit is contained in:
Yanick Champoux 2022-07-25 11:34:24 -04:00
parent d555b10db9
commit 615cc0f581

View File

@ -3,15 +3,17 @@ package App::Changelord::Command::Add;
use 5.36.0;
use Moo;
use CLI::Osprey desc => 'add a change to the changelog';
use CLI::Osprey
desc => 'add a change to the NEXT release',
description_pod => <<'END';
Add a change entry to the NEXT release.
END
use PerlX::Maybe;
use Path::Tiny;
use App::Changelord::Command::Init;
has changelog => ( is => 'lazy' );
sub _build_changelog ($self) { $self->parent_command->changelog }
with 'App::Changelord::Role::Changelog';
# TODO validate the type
option type => (
@ -48,7 +50,7 @@ sub next_release($self) {
}
sub save_changelog($self) {
my $src = $self->parent_command->source;
my $src = $self->source;
path($src)->spew( App::Changelord::Command::Init::serialize_changelog($self) );
}
@ -63,6 +65,8 @@ sub run ($self) {
};
$self->save_changelog;
say "change added to the changelog";
}
'end of App::Changelog::Command::Add';