From: Peter Rabbitson Date: Wed, 9 Sep 2015 19:33:34 +0000 (+0200) Subject: (travis) Enhance checks (and diag) whether a core module did in fact upgrade X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a223f7584ab03d99e77332cdb1b59a91c34fff5e;p=dbsrgits%2FDBIx-Class.git (travis) Enhance checks (and diag) whether a core module did in fact upgrade --- diff --git a/maint/travis-ci_scripts/common.bash b/maint/travis-ci_scripts/common.bash index 1f4df78..f9d8b4a 100755 --- a/maint/travis-ci_scripts/common.bash +++ b/maint/travis-ci_scripts/common.bash @@ -208,9 +208,43 @@ my $mod = ( : $ARGV[0] ); -$mod = q{List::Util} if $mod eq q{Scalar::List::Utils}; +# map some install-names to a module/version combo +# serves both as a grandfathered title-less tarball, and +# as a minimum version check for upgraded core modules +my $eval_map = { -eval qq{require($mod)} or ( print $@ and exit 1) + # this is temporary, will need something more robust down the road + # (perhaps by then Module::CoreList will be dep-free) + "Module::Build" => { ver => "0.4214" }, + + "File::Spec" => { ver => "3.47" }, + "Cwd" => { ver => "3.47" }, + + "List::Util" => { ver => "1.42" }, + "Scalar::Util" => { ver => "1.42" }, + "Scalar::List::Utils" => { mod => "List::Util", ver => "1.42" }, +}; + +eval( + "require " + + . + + ( $eval_map->{$mod}{mod} || $mod ) + + . + + ($eval_map->{$mod}{ver} + ? "; $mod->VERSION(\$eval_map->{\$mod}{ver}) " + : "" + ) + + . + + "; 1" +) + or +( print $@ and exit 1) ' "$m" 2> /dev/null ; then echo -e "$m installation seems to have failed"