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:13:58 UTC

[1/2] lucy-clownfish git commit: Export major version from Perl bindings

Repository: lucy-clownfish
Updated Branches:
  refs/heads/master efc37a364 -> 0c5c166ee


Export major version from Perl bindings

Fixes CLOWNFISH-70.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/997e246b
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/997e246b
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/997e246b

Branch: refs/heads/master
Commit: 997e246b582b068615b1fbdcfad61aa9f6a13ae9
Parents: efc37a3
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Thu Feb 11 12:58:49 2016 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Thu Feb 11 13:01:49 2016 +0100

----------------------------------------------------------------------
 compiler/perl/lib/Clownfish/CFC.pm |  1 +
 devel/bin/update_version           | 12 ++++++++++--
 runtime/perl/lib/Clownfish.pm      |  1 +
 3 files changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/997e246b/compiler/perl/lib/Clownfish/CFC.pm
----------------------------------------------------------------------
diff --git a/compiler/perl/lib/Clownfish/CFC.pm b/compiler/perl/lib/Clownfish/CFC.pm
index 0344bcb..39ce119 100644
--- a/compiler/perl/lib/Clownfish/CFC.pm
+++ b/compiler/perl/lib/Clownfish/CFC.pm
@@ -19,6 +19,7 @@ use warnings;
 package Clownfish::CFC;
 our $VERSION = '0.004000';
 $VERSION = eval $VERSION;
+our $MAJOR_VERSION = 0.004000;
 
 END {
     Clownfish::CFC::Model::Class->_clear_registry();

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/997e246b/devel/bin/update_version
----------------------------------------------------------------------
diff --git a/devel/bin/update_version b/devel/bin/update_version
index 6df810d..932fa42 100755
--- a/devel/bin/update_version
+++ b/devel/bin/update_version
@@ -28,13 +28,13 @@ my $version = shift(@ARGV) or die $usage;
 # standardize version strings
 my ( $x, $y, $z, $dev );
 if ( $version =~ m/^(\d+)\.(\d+)\.(\d+)$/ ) {
-    ( $x, $y, $z ) = ( $1, $2, $3 );
+    ( $x, $y, $z, $dev ) = ( $1, $2, $3, 0 );
 }
 elsif ( $version =~ m/^(\d+)\.(\d+)\.(\d+)_(\d+)$/ ) {
     ( $x, $y, $z, $dev ) = ( $1, $2, $3, $4 );
 }
 elsif ( $version =~ m/^(\d+)\.(\d\d\d)(\d\d\d)$/ ) {
-    ( $x, $y, $z ) = ( int($1), int($2), int($3) );
+    ( $x, $y, $z, $dev ) = ( int($1), int($2), int($3), 0 );
 }
 elsif ( $version =~ m/^(\d+)\.(\d\d\d)(\d\d\d)_(\d\d\d)$/ ) {
     ( $x, $y, $z, $dev ) = ( int($1), int($2), int($3), int($4) );
@@ -70,6 +70,10 @@ $buf =~ s/(our \$VERSION\ +=\ +)'.+?'/$1'$x_yyyzzz_version'/g
     or die "no match";
 $buf =~ s/XSLoader::load\( 'Clownfish::CFC', '(.+?)'/XSLoader::load\( 'Clownfish::CFC', '$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";
+}
 write_file( 'compiler/perl/lib/Clownfish/CFC.pm', $buf );
 
 # Update Clownfish.pm.
@@ -80,6 +84,10 @@ $buf =~ s/(bootstrap Clownfish ')(.+?)'/$1$x_y_z_d_version'/
     or die "no match";
 $buf =~ s/^\d+\.\d+\.\d+(_\d+)?\b$/$x_y_z_d_version/m
     or die "no match";
+if ( $z == 0 && $dev == 0 ) {
+    $buf =~ s/(our \$MAJOR_VERSION\ +=\ +)[\d._]+/$1$x_yyyzzz_version/g
+        or die "no match";
+}
 write_file( 'runtime/perl/lib/Clownfish.pm', $buf );
 
 # Update Clownfish.pod.

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/997e246b/runtime/perl/lib/Clownfish.pm
----------------------------------------------------------------------
diff --git a/runtime/perl/lib/Clownfish.pm b/runtime/perl/lib/Clownfish.pm
index 840bcbd..1a6f7cd 100644
--- a/runtime/perl/lib/Clownfish.pm
+++ b/runtime/perl/lib/Clownfish.pm
@@ -22,6 +22,7 @@ use 5.008003;
 
 our $VERSION = '0.004000';
 $VERSION = eval $VERSION;
+our $MAJOR_VERSION = 0.004000;
 
 use Exporter 'import';
 BEGIN {


[2/2] lucy-clownfish git commit: Don't try to update version in generated Clownfish.pod

Posted by nw...@apache.org.
Don't try to update version in generated Clownfish.pod


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/0c5c166e
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/0c5c166e
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/0c5c166e

Branch: refs/heads/master
Commit: 0c5c166ee8a26c55c8190068c72f70d898d088cb
Parents: 997e246
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Thu Feb 11 13:04:23 2016 +0100
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Thu Feb 11 13:04:23 2016 +0100

----------------------------------------------------------------------
 devel/bin/update_version | 6 ------
 1 file changed, 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/0c5c166e/devel/bin/update_version
----------------------------------------------------------------------
diff --git a/devel/bin/update_version b/devel/bin/update_version
index 932fa42..a6c792e 100755
--- a/devel/bin/update_version
+++ b/devel/bin/update_version
@@ -90,12 +90,6 @@ if ( $z == 0 && $dev == 0 ) {
 }
 write_file( 'runtime/perl/lib/Clownfish.pm', $buf );
 
-# Update Clownfish.pod.
-$buf = read_file('runtime/perl/lib/Clownfish.pod');
-$buf =~ s/(^=head1\s+VERSION\s+)([\d._]+)/$1$x_y_z_d_version/m
-    or die "no match";
-write_file( 'runtime/perl/lib/Clownfish.pod', $buf );
-
 # Update compiler Build.PL
 $buf = read_file('compiler/perl/Build.PL');
 $buf =~ s/(dist_version\ +=>\ +)'.+?'/$1'$x_y_z_d_version'/