27 lines
497 B
Perl
27 lines
497 B
Perl
package App::Changelord::Command::Schema;
|
|
# SYNOPSIS: print out the changelog schema
|
|
|
|
use 5.36.0;
|
|
|
|
use Moo;
|
|
use CLI::Osprey;
|
|
|
|
use Path::Tiny;
|
|
use JSON;
|
|
use YAML;
|
|
|
|
option json => (
|
|
is => 'ro',
|
|
default => 0,
|
|
doc => 'output schema as json',
|
|
);
|
|
|
|
sub run($self) {
|
|
|
|
my $schema = YAML::Load(path(__FILE__)->sibling('changelog-schema.yml')->slurp);
|
|
|
|
print $self->json ? JSON->new->pretty->encode(YAML::Load($schema)) : YAML::Dump($schema);
|
|
}
|
|
|
|
'end of App::Changelog::Command::Schema';
|