Use specific X.Y.Z version in Build.PL.

Otherwise, if we take it from CFC.pm the dist will be named
Clownfish-CFC-X.YYYZZZ.tar.gz when we want Clownfish-CFC-X.Y.Z.


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

Branch: refs/heads/master
Commit: 485303dabc6ac65d806118e857e5312489e5c06f
Parents: d9d55cc
Author: Marvin Humphrey <[email protected]>
Authored: Thu Aug 14 16:50:17 2014 -0700
Committer: Marvin Humphrey <[email protected]>
Committed: Wed Aug 20 16:59:52 2014 -0700

----------------------------------------------------------------------
 compiler/perl/Build.PL   | 2 +-
 devel/bin/update_version | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/485303da/compiler/perl/Build.PL
----------------------------------------------------------------------
diff --git a/compiler/perl/Build.PL b/compiler/perl/Build.PL
index af7256b..020af01 100644
--- a/compiler/perl/Build.PL
+++ b/compiler/perl/Build.PL
@@ -24,7 +24,7 @@ my $builder = Clownfish::CFC::Build->new(
     license     => 'apache',
     dist_author =>
         'The Apache Lucy Project <dev at lucy dot apache dot org>',
-    dist_version_from => 'lib/Clownfish/CFC.pm',
+    dist_version       => '0.4.0',
     dist_abstract      => 'CFC Apache Clownfish compiler',
     requires           => { 'perl' => '5.8.3', },
     configure_requires => { 'Module::Build' => 0.280801 },

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/485303da/devel/bin/update_version
----------------------------------------------------------------------
diff --git a/devel/bin/update_version b/devel/bin/update_version
index ce1f9a8..dc01d4b 100755
--- a/devel/bin/update_version
+++ b/devel/bin/update_version
@@ -77,6 +77,12 @@ $buf =~ s/(^=head1\s+VERSION\s+)([\d.]+)/$1$x_y_z_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_version'/
+    or die "no match";
+write_file( 'compiler/perl/Build.PL', $buf );
+
 # Update runtime Build.PL
 $buf = read_file('runtime/perl/Build.PL');
 $buf =~ s/(dist_version\ +=>\ +)'.+?'/$1'$x_y_z_version'/

Reply via email to