You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2016/02/11 13:36:16 UTC
lucy git commit: Check for incompatible Clownfish major version
Repository: lucy
Updated Branches:
refs/heads/master 4c5c08021 -> cd2d01960
Check for incompatible Clownfish major version
Fixes LUCY-289.
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/cd2d0196
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/cd2d0196
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/cd2d0196
Branch: refs/heads/master
Commit: cd2d01960c50969cad03979e4e2392e170f23a72
Parents: 4c5c080
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Thu Feb 11 13:20:15 2016 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Thu Feb 11 13:20:15 2016 +0100
----------------------------------------------------------------------
devel/bin/update_version | 4 ++++
perl/lib/Lucy.pm | 8 ++++++++
2 files changed, 12 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucy/blob/cd2d0196/devel/bin/update_version
----------------------------------------------------------------------
diff --git a/devel/bin/update_version b/devel/bin/update_version
index 8e464dd..52dbb45 100755
--- a/devel/bin/update_version
+++ b/devel/bin/update_version
@@ -75,8 +75,12 @@ $buf =~ s/(our \$VERSION\ +=\ +)'.+?'/$1'$x_yyyzzz_version'/g
$buf =~ s/(bootstrap\s+Lucy\s+)'[\d\._]+'/$1'$x_y_z_d_version'/
or die "no match";
if ( $z == 0 && $dev == 0 ) {
+ $buf =~ s/(our \$MAJOR_VERSION\ +=\ +)[\d._]+/$1$x_yyyzzz_version/g
+ or die "no match";
$buf =~ s/(use Clownfish +)[\d\._]+/$1$x_yyyzzz_version/g
or die "no match";
+ $buf =~ s/(if \$Clownfish::MAJOR_VERSION\ +>\ +)[\d._]+/$1$x_yyyzzz_version/g
+ or die "no match";
}
write_file( 'perl/lib/Lucy.pm', $buf );
http://git-wip-us.apache.org/repos/asf/lucy/blob/cd2d0196/perl/lib/Lucy.pm
----------------------------------------------------------------------
diff --git a/perl/lib/Lucy.pm b/perl/lib/Lucy.pm
index 715f055..c9f8b36 100644
--- a/perl/lib/Lucy.pm
+++ b/perl/lib/Lucy.pm
@@ -22,8 +22,16 @@ use 5.008003;
our $VERSION = '0.004000';
$VERSION = eval $VERSION;
+our $MAJOR_VERSION = 0.004000;
use Clownfish 0.004000;
+BEGIN {
+ die <<"EOF" if $Clownfish::MAJOR_VERSION > 0.004000;
+This version of Lucy doesn't support Clownfish $Clownfish::MAJOR_VERSION or
+higher. You should downgrade Clownfish or, if possible, upgrade Lucy.
+EOF
+}
+
use Exporter 'import';
BEGIN {
our @EXPORT_OK = qw(