Acme-ProgressBar
view release on metacpan or search on metacpan
398399400401402403404405406407408409410411412413414415416417418
"config"
: {
"Dist::Zilla::Plugin::Git::Check"
: {
"untracked_files"
:
"die"
},
"Dist::Zilla::Role::Git::DirtyFiles"
: {
"allow_dirty"
: [
"Changes"
,
"dist.ini"
],
"allow_dirty_match"
: [],
"changelog"
:
"Changes"
},
"Dist::Zilla::Role::Git::Repo"
: {
"git_version"
:
"2.38.0"
,
"repo_root"
:
"."
}
},
"name"
:
"@RJBS/@Git/Check"
,
"version"
:
"2.048"
},
{
422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460
"add_files_in"
: [],
"commit_msg"
:
"v%V%n%n%c"
,
"signoff"
: 0
},
"Dist::Zilla::Role::Git::DirtyFiles"
: {
"allow_dirty"
: [
"Changes"
,
"dist.ini"
],
"allow_dirty_match"
: [],
"changelog"
:
"Changes"
},
"Dist::Zilla::Role::Git::Repo"
: {
"git_version"
:
"2.38.0"
,
"repo_root"
:
"."
},
"Dist::Zilla::Role::Git::StringFormatter"
: {
"time_zone"
:
"local"
}
},
"name"
:
"@RJBS/@Git/Commit"
,
"version"
:
"2.048"
},
{
"class"
:
"Dist::Zilla::Plugin::Git::Tag"
,
"config"
: {
"Dist::Zilla::Plugin::Git::Tag"
: {
"branch"
: null,
"changelog"
:
"Changes"
,
"signed"
: 0,
"tag"
:
"1.130"
,
"tag_format"
:
"%v"
,
"tag_message"
:
"v%V"
},
"Dist::Zilla::Role::Git::Repo"
: {
"git_version"
:
"2.38.0"
,
"repo_root"
:
"."
},
"Dist::Zilla::Role::Git::StringFormatter"
: {
290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341-
class: Dist::Zilla::Plugin::Git::Check
config:
Dist::Zilla::Plugin::Git::Check:
untracked_files:
die
Dist::Zilla::Role::Git::DirtyFiles:
allow_dirty:
- Changes
- dist.ini
allow_dirty_match: []
changelog: Changes
Dist::Zilla::Role::Git::Repo:
git_version: 2.38.0
repo_root: .
name:
'@RJBS/@Git/Check'
version:
'2.048'
-
class: Dist::Zilla::Plugin::Git::Commit
config:
Dist::Zilla::Plugin::Git::Commit:
add_files_in: []
commit_msg: v
%V
%n
%n
%c
signoff: 0
Dist::Zilla::Role::Git::DirtyFiles:
allow_dirty:
- Changes
- dist.ini
allow_dirty_match: []
changelog: Changes
Dist::Zilla::Role::Git::Repo:
git_version: 2.38.0
repo_root: .
Dist::Zilla::Role::Git::StringFormatter:
time_zone:
local
name:
'@RJBS/@Git/Commit'
version:
'2.048'
-
class: Dist::Zilla::Plugin::Git::Tag
config:
Dist::Zilla::Plugin::Git::Tag:
branch: ~
changelog: Changes
signed: 0
tag:
'1.130'
tag_format:
'%v'
tag_message: v
%V
Dist::Zilla::Role::Git::Repo:
git_version: 2.38.0
repo_root: .
Dist::Zilla::Role::Git::StringFormatter:
time_zone:
local
name:
'@RJBS/@Git/Tag'
xt/release/changes_has_content.t view on Meta::CPAN
121314151617181920212223242526272829303132333435363738394041
ok(_get_changes(
$newver
),
"$changes_file has content for $newver"
);
}
done_testing;
sub
_get_changes
{
my
$newver
=
shift
;
# parse changelog to find commit message
open
(
my
$fh
,
'<'
,
$changes_file
) or
die
"cannot open $changes_file: $!"
;
my
$changelog
=
join
(
''
, <
$fh
>);
if
(
$encoding
) {
$changelog
= Encode::decode(
$encoding
,
$changelog
, Encode::FB_CROAK());
}
close
$fh
;
my
@content
=
grep
{ /^
$newver
(?:
$trial_token
)?(?:\s+|$)/ ... /^\S/ }
# from newver to un-indented
split
/\n/,
$changelog
;
shift
@content
;
# drop the version line
# drop unindented last line and trailing blank lines
pop
@content
while
(
@content
&&
$content
[-1] =~ /^(?:\S|\s*$)/ );
# return number of non-blank lines
return
scalar
@content
;
}
( run in 0.263 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )