4 use ExtUtils::MakeMaker;
5 use File::Spec::Functions qw(devnull);
7 my $last_tag = `git describe --abbrev=0`;
11 or plan skip_all => "Only usable in a git checkout";
13 my @subdirs = qw(PNG TIFF GIF JPEG W32 T1 FT2);
15 plan tests => scalar(@subdirs);
17 for my $dir (@subdirs) {
18 my @changes = `git log --abbrev --oneline $last_tag..HEAD $dir`;
21 @changes or skip "No changes for $dir", 1;
22 my $vfile = "$dir/$dir.pm";
23 my $current = eval { MM->parse_version($vfile) };
24 my $last_rel_content = get_file_from_git($vfile, $last_tag);
25 my $last = eval { MM->parse_version(\$last_rel_content) };
26 isnt($current, $last, "$dir updated, $vfile version bump");
30 sub get_file_from_git {
31 my ($file, $tag) = @_;
34 return scalar `git --no-pager show $tag:$file 2>$null`;