bluto

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

commit 09718d272fbf64aa59e92c0513e4414782190506
parent de77e8f360738034192d6b67abf91f101cf23c35
Author: lash <dev@holbrook.no>
Date:   Thu,  6 Mar 2025 03:43:15 +0000

Add timestamping

Diffstat:
MBluto.pm | 4+++-
MBluto/Yaml.pm | 1+
Mbluto-gen | 1+
3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Bluto.pm b/Bluto.pm @@ -35,6 +35,7 @@ our %m_main = ( tag_prefix => VCS_TAG_PREFIX, changelog => undef, time => undef, + timeobj => undef, #tech_main => undef, tech => undef, vcs => \@m_vcs, @@ -311,7 +312,8 @@ sub from_yaml { error('generated archive but could not find again in expected place: ' . $targz); return undef; } - $m_main{time} = DateTime->from_epoch( epoch => $targz_stat[9] )->stringify(); + $m_main{timeobj} = DateTime->from_epoch( epoch => $targz_stat[9] ); + $m_main{time} = $m_main{timeobj}->stringify(); foreach my $v ( @{$cfg_m->{locate}->{tgzbase}}) { warn('not checking targz base formatting for ' . $v); my $src = $m_main{slug} . '/' . basename($targz); diff --git a/Bluto/Yaml.pm b/Bluto/Yaml.pm @@ -53,6 +53,7 @@ sub add_release_yaml { $yb->{releases} = {}; } + $yr->{timestamp} = $release->{timeobj}->epoch; $yb->{releases}->{$env->{version}} = $yr; $yb = add_existing_releases($release, $yb); diff --git a/bluto-gen b/bluto-gen @@ -28,6 +28,7 @@ my $yv = { author => $yd->{author}->{name}, maintainer => $yd->{maintainer}->{name}, contributors => \@contributors, + timestamp => -1, }; my $yo = YAML::Tiny->new($yv);