bluto-gen (776B)
1 #!/usr/bin/env perl 2 3 use v5.10.1; 4 use warnings; 5 use strict; 6 7 use File::Basename qw/ dirname /; 8 use Cwd qw/ getcwd abs_path /; 9 use lib (dirname(abs_path($0))); 10 11 use Bluto::Cmd; 12 13 Bluto::Cmd::register_param("version", undef, "version", undef); 14 Bluto::Cmd::register_param("changelog_file", undef, undef, "f"); 15 16 Bluto::Cmd::process_param(); 17 18 my $version = Bluto::Cmd::get_version(); 19 if (!defined $version) { 20 Bluto::Cmd::croak("version missing"); 21 } 22 23 24 my @contributors; 25 my $yd = Bluto::Cmd::base_config(); 26 my $yv = { 27 changelog => 'sha256:' . Bluto::Cmd::process_changelog(1), 28 author => $yd->{author}->{name}, 29 maintainer => $yd->{maintainer}->{name}, 30 contributors => \@contributors, 31 }; 32 33 my $yo = YAML::Tiny->new($yv); 34 my $fn = Bluto::Cmd::release_config_path(); 35 $yo->write($fn);