From 9dd824c0b5220a7e661b871cef4d3f1160e8172e Mon Sep 17 00:00:00 2001 From: Tony Cook Date: Tue, 14 Aug 2012 19:31:19 +1000 Subject: [PATCH] add an unshipped test for checking sub-module versions are updated --- GIF/Changes | 4 ++++ GIF/GIF.pm | 2 +- PNG/Changes | 5 +++++ PNG/PNG.pm | 2 +- t/x90cmpversion.t | 35 +++++++++++++++++++++++++++++++++++ 5 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 t/x90cmpversion.t diff --git a/GIF/Changes b/GIF/Changes index 0668d682..a854d3e1 100644 --- a/GIF/Changes +++ b/GIF/Changes @@ -1,8 +1,12 @@ +Imager-File-GIF 0.84 +==================== - giflib 4.2 eliminates the GIF_LIB_VERSION macro, handle that correctly for both probing and runtime. https://rt.cpan.org/Ticket/Display.html?id=77672 + - allow building with C89 compilers + Imager-File-GIF 0.83 ==================== diff --git a/GIF/GIF.pm b/GIF/GIF.pm index 1d274691..db788725 100644 --- a/GIF/GIF.pm +++ b/GIF/GIF.pm @@ -4,7 +4,7 @@ use Imager; use vars qw($VERSION @ISA); BEGIN { - $VERSION = "0.83"; + $VERSION = "0.84"; require XSLoader; XSLoader::load('Imager::File::GIF', $VERSION); diff --git a/PNG/Changes b/PNG/Changes index 940da036..2711a513 100644 --- a/PNG/Changes +++ b/PNG/Changes @@ -1,3 +1,8 @@ +Imager-File-PNG 0.85 +==================== + + - fix some compiler warnings, no functional changes + Imager-File-PNG 0.84 ==================== diff --git a/PNG/PNG.pm b/PNG/PNG.pm index da6bda5c..84db5900 100644 --- a/PNG/PNG.pm +++ b/PNG/PNG.pm @@ -4,7 +4,7 @@ use Imager; use vars qw($VERSION @ISA); BEGIN { - $VERSION = "0.84"; + $VERSION = "0.85"; require XSLoader; XSLoader::load('Imager::File::PNG', $VERSION); diff --git a/t/x90cmpversion.t b/t/x90cmpversion.t new file mode 100644 index 00000000..ddaa88a3 --- /dev/null +++ b/t/x90cmpversion.t @@ -0,0 +1,35 @@ +#!perl -w +use strict; +use Test::More; +use ExtUtils::MakeMaker; +use File::Spec::Functions qw(devnull); + +my $last_tag = `git describe --abbrev=0`; +chomp $last_tag; + +$last_tag + or plan skip_all => "Only usable in a git checkout"; + +my @subdirs = qw(PNG TIFF GIF JPEG W32 T1 FT2); + +plan tests => scalar(@subdirs); + +for my $dir (@subdirs) { + my @changes = `git log --abbrev --oneline $last_tag..HEAD $dir`; + SKIP: + { + @changes or skip "No changes for $dir", 1; + my $vfile = "$dir/$dir.pm"; + my $current = eval { MM->parse_version($vfile) }; + my $last_rel_content = get_file_from_git($vfile, $last_tag); + my $last = eval { MM->parse_version(\$last_rel_content) }; + isnt($current, $last, "$dir updated, $vfile version bump"); + } +} + +sub get_file_from_git { + my ($file, $tag) = @_; + my $null = devnull(); + local $/; + return scalar `git --no-pager show $tag:$file 2>$null`; +} -- 2.39.5