LCFG-Build-VCS
view release on metacpan or search on metacpan
lib/LCFG/Build/VCS.pm view on Meta::CPAN
148149150151152153154155156157158159160161162163164165166167
}
}
$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
195196197198199200201202203204205206207208209210211212213214215
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
244245246247248249250251252253254255256257258259260261262263264
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 )