bluto

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

commit d439b2691393d00a56dca42ca7480c68c95a4bfd
parent 7ed4da0449182876aad5e79f6ba8ed1e06766c12
Author: lash <dev@holbrook.no>
Date:   Mon,  9 Sep 2024 00:58:01 +0100

Fix broken catfile usage from File::Spec

Diffstat:
MBluto.pm | 6+++---
MBluto/RSS.pm | 3++-
MBluto/Tree.pm | 2+-
Mto_std.pl | 2+-
4 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/Bluto.pm b/Bluto.pm @@ -121,7 +121,7 @@ sub _check_readme { my $fp; for my $fn (('README', 'README.txt', 'README.adoc', 'README.rst', 'README.md')) { - $fp = File::Spec->catfile($env->{src_dir}, $fn); + $fp = File::Spec->catfile($env->{content_dir}, $fn); if ( -f $fp ) { debug('using readme file: ' . $fp); $env{readme} = $fp; @@ -138,7 +138,7 @@ sub _check_version { my $f; my $fp; - $fp = File::Spec->catfile($env->{src_dir}, 'VERSION'); + $fp = File::Spec->catfile($env->{content_dir}, 'VERSION'); if ($env->{version}) { info('writing new explicit version ' . $env->{version} . ' to file: ' . $fp); open($f, '>', $fp); @@ -179,7 +179,7 @@ sub from_config { if (defined $cfg->{version}) { $version = $cfg->{version}; } else { - $fn = File::Spec->catfile($env->{src_dir}, 'VERSION'); + $fn = File::Spec->catfile($env->{content_dir}, 'VERSION'); open(my $f, '<', $fn) or error('no version file found: ' . $fn) && return undef; $version = <$f>; close($f); diff --git a/Bluto/RSS.pm b/Bluto/RSS.pm @@ -73,12 +73,13 @@ sub process { } } + print "releasetime ". $release->{time} . "\n"; $rss->add_item ( title => $rss_title, link => $release->{src}[0], description => $body, dc => { - date => $release{time}, + date => $release->{time}, }, # dc => { # subject => "X11/Utilities", diff --git a/Bluto/Tree.pm b/Bluto/Tree.pm @@ -1,7 +1,7 @@ package Bluto::Tree; -use File::Spec qw/ catfile /; +use File::Spec; use File::Path qw/ make_path /; our $_release_path; diff --git a/to_std.pl b/to_std.pl @@ -8,7 +8,7 @@ use strict; use Getopt::Long qw/ :config auto_help /; #use File::Temp qw/ tempdir /; use File::Basename qw/ dirname /; -use File::Spec qw/ catfile /; +use File::Spec; use File::Path qw/ make_path /; use Cwd qw/ getcwd abs_path /; use lib (dirname(abs_path($0)));