LCFG-Build-VCS
view release on metacpan or search on metacpan
lib/LCFG/Build/VCS.pm view on Meta::CPAN
}
}
$tag =~ s/\./_/g;
$tag =~ s/\-/_/g;
return $tag;
}
sub update_changelog {
my ( $self, $version, $options ) = @_;
$options //= {};
$options->{dryrun} = $self->dryrun;
$options->{id} = $self->id;
$options->{version} = $version;
$options->{style} ||= 'default';
my $dir = $self->workdir;
lib/LCFG/Build/VCS.pm view on Meta::CPAN
if ( !$self->dryrun ) {
if ($needs_add) {
$self->run_cmd( 'add', $logfile );
}
}
return;
}
sub update_lcfg_changelog {
my ( $logfile, $options ) = @_;
$options //= {};
$options->{date} ||= DateTime->now->ymd;
my $dir = (File::Spec->splitpath($logfile))[1];
my $tmplog = File::Temp->new(
TEMPLATE => 'lcfgXXXXXX',
UNLINK => 1,
lib/LCFG/Build/VCS.pm view on Meta::CPAN
or die "Could not rename $tmpname as $logfile: $!\n";
}
return;
}
# These update_*_changelog subroutines are also used externally from
# places which do not have access to the VCS object so they are not
# class methods.
sub update_debian_changelog {
my ( $logfile, $options ) = @_;
$options //= {};
$options->{urgency} ||= 'low';
$options->{distribution} ||= 'unstable';
$options->{release} //= 1;
$options->{message} ||= 'New upstream release';
# RFC822 date
$options->{date} = DateTime->now->strftime('%a, %d %b %Y %H:%M:%S %z');
( run in 0.232 second using v1.01-cache-2.11-cpan-2b0bae70ee8 )