Author: marvin
Date: Wed Mar 7 19:54:34 2012
New Revision: 1298075
URL: http://svn.apache.org/viewvc?rev=1298075&view=rev
Log:
Increment version in all .pm files.
Modified:
incubator/lucy/branches/0.3/ (props changed)
incubator/lucy/branches/0.3/devel/bin/update_version
Propchange: incubator/lucy/branches/0.3/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Mar 7 19:54:34 2012
@@ -1 +1 @@
-/incubator/lucy/trunk:1225600-1225601,1226190-1226191,1226199,1226310,1226462-1226463,1227324,1229862-1229867,1232278,1242618,1294458,1294461,1294825,1296755-1296759
+/incubator/lucy/trunk:1225600-1225601,1226190-1226191,1226199,1226310,1226462-1226463,1227324,1229862-1229867,1232278,1242618,1294458,1294461,1294825,1296755-1296760
Modified: incubator/lucy/branches/0.3/devel/bin/update_version
URL:
http://svn.apache.org/viewvc/incubator/lucy/branches/0.3/devel/bin/update_version?rev=1298075&r1=1298074&r2=1298075&view=diff
==============================================================================
--- incubator/lucy/branches/0.3/devel/bin/update_version (original)
+++ incubator/lucy/branches/0.3/devel/bin/update_version Wed Mar 7 19:54:34
2012
@@ -17,6 +17,7 @@
use strict;
use warnings;
use FindBin qw( $Bin );
+use File::Find;
# make sure we are at the top-level dir
if ( !-d 'perl' and !-d 'core' ) {
@@ -45,22 +46,37 @@ print "Using version: $x_y_z_version ( $
my $buf;
-# the actual work
+# Update Lucy.pm.
$buf = read_file('perl/lib/Lucy.pm');
$buf =~ s/(our \$VERSION\ +=\ +)'.+?'/$1'$x_yyyzzz_version'/
or die "no match";
$buf =~ s/XSLoader::load\( 'Lucy', '(.+?)'/XSLoader::load\( 'Lucy',
'$x_yyyzzz_version'/
or die "no match";
write_file( 'perl/lib/Lucy.pm', $buf );
+
+# Update Lucy.pod.
$buf = read_file('perl/lib/Lucy.pod');
$buf =~ s/(^=head1\s+VERSION\s+)([\d.]+)/$1$x_y_z_version/m
or die "no match";
write_file( 'perl/lib/Lucy.pod', $buf );
+
+# Update Build.PL
$buf = read_file('perl/Build.PL');
$buf =~ s/(dist_version\ +=>\ +)'.+?'/$1'$x_y_z_version'/
or die "no match";
write_file( 'perl/Build.PL', $buf );
+# Update all other Perl modules.
+find sub {
+ return unless /[.]pm$/;
+ my $name = $_;
+ return if $name eq 'Lucy.pm';
+ my $buf = read_file($name);
+ $buf =~ s/(our \$VERSION\ +=\ +)'.+?'/$1'$x_yyyzzz_version'/g
+ or die "no match in $File::Find::name";
+ write_file($name, $buf);
+}, 'perl';
+
# utility functions
sub read_file {
my ($file) = @_;