bluto

Release package and announcement generator
Info | Log | Files | Refs | README | LICENSE

bluto-pub (1164B)


      1 #!/usr/bin/env perl
      2 
      3 use v5.10.1;
      4 use warnings;
      5 use strict;
      6 
      7 use File::Spec;
      8 use File::Basename qw/ dirname /;
      9 use Cwd qw/ getcwd abs_path /;
     10 use lib (dirname(abs_path($0)));
     11 
     12 use Bluto::Log qw/debug/;
     13 use Bluto::Cmd;
     14 use Bluto;
     15 
     16 Bluto::Cmd::register_param("version", undef, "version", undef);
     17 Bluto::Cmd::register_param("out_dir", File::Spec->catfile(getcwd, 'bluto_build'), undef, "o");
     18 Bluto::Cmd::register_param("feed_dir", undef, "feed-dir", undef);
     19 Bluto::Cmd::register_param("content_dir", undef, "code-dir", "c");
     20 Bluto::Cmd::register_param("readme", undef, undef, undef);
     21 
     22 Bluto::Cmd::process_param();
     23 
     24 my $version = Bluto::Cmd::get_version();
     25 if (!defined $version) {
     26 	die("version missing");
     27 }
     28 
     29 my $ym = Bluto::Cmd::base_config();
     30 my $yv = Bluto::Cmd::release_config();
     31 my $env = Bluto::Cmd::params();
     32 if (!defined $env) {
     33 	die("not sane");
     34 }
     35 
     36 my $version = Bluto::from_yaml($ym, $yv, $env);
     37 if (!defined $version) {
     38 	die("config processing failed");
     39 }
     40 
     41 my $announce = Bluto::create_announce($env);
     42 if (!defined $announce) {
     43 	die("announce processing failed");
     44 }
     45 
     46 my $rss = Bluto::create_rss($env);
     47 if (!defined $rss) {
     48 	die("rss processing failed");
     49 }