bluto

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

commit 67f313ddf3a961b5de0a95553f3365724a4f8773
parent 0b7a10b32bab919fa594d290dc173e0dd14973e8
Author: lash <dev@holbrook.no>
Date:   Wed, 19 Jun 2024 20:14:32 +0100

Remove generator/engine info to template footer

Diffstat:
MBluto.pm | 8+++++++-
MBluto/RSS.pm | 3+--
DBluto/Version.pm | 5-----
Mbase.tt | 4++++
Mto_std.pl | 9++++++++-
5 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/Bluto.pm b/Bluto.pm @@ -7,6 +7,7 @@ use Log::Term::Ansi qw/error info debug warn trace/; use Bluto::Archive; use constant { VCS_TAG_PREFIX => 'v' }; +use constant { VERSION => '0.0.1' }; my %config; my @m_tech; @@ -31,6 +32,7 @@ my %m_main = ( src => \@m_src, author_maintainer => \@m_author_maintainer, author_origin => \@m_author_origin, + engine => undef, ); my $have_version_match = undef; @@ -233,14 +235,18 @@ sub from_config { } } - if (!defined $m_main{changelog}) { + if (!defined $m_main{changelog} || ref($m_main{changelog} eq 'ARRAY')) { error('changelog content empty after exhausting all options'); + return undef; } + $m_main{engine} = $env->{engine}; + for $k (keys %m_main) { debug('release data: ' . $k . ': ' . $m_main{$k}); } + return $have_version_match; } diff --git a/Bluto/RSS.pm b/Bluto/RSS.pm @@ -7,7 +7,6 @@ use XML::RSS; use Template; use Log::Term::Ansi qw/error info debug warn trace/; -use Bluto::Version; sub get_feed_filepath { @@ -48,7 +47,7 @@ sub process { dc => { date => DateTime->now()->stringify(), creator => $release->{author_maintainer}[0], - publisher => "$0 " . SemVer->new(Bluto::Version::VERSION). " (perl $^V)", + publisher => $release->{author_maintainer}[0], }, # subject => "Linux Software", # creator => 'scoop@freshmeat.net', diff --git a/Bluto/Version.pm b/Bluto/Version.pm @@ -1,5 +0,0 @@ -package Bluto::Version; - -use constant { VERSION => '0.0.1' }; - -1; diff --git a/base.tt b/base.tt @@ -26,3 +26,7 @@ CHANGELOG --- [% changelog %] + +--- + +Release generator: [% engine %] diff --git a/to_std.pl b/to_std.pl @@ -32,6 +32,7 @@ my %env = ( feed_dir => getcwd, content_dir => getcwd, template_path => 'base.tt', + engine => undef, ); #my $src_dir = #my $out_dir = getcwd; @@ -44,7 +45,13 @@ GetOptions( 'c:s', \$env{content_dir}, ); foreach my $k (keys %env ) { - $env{$k} = abs_path($env{$k}); + if (defined $env{$k}) { + $env{$k} = abs_path($env{$k}); + } +} + +$env{engine} = 'bluto v' . SemVer->new(Bluto::VERSION). " (perl $^V)"; +foreach my $k (keys %env ) { debug('environment "' . $k . '": ' . $env{$k}); }