Repository: lucy-clownfish
Updated Branches:
  refs/heads/master 36404c95a -> 05d3caa62


Update version script


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

Branch: refs/heads/master
Commit: cd6d31401dcf83b1ad8226c53c374a18cf31f56f
Parents: 36404c9
Author: Nick Wellnhofer <wellnho...@aevum.de>
Authored: Fri Mar 4 13:56:14 2016 +0100
Committer: Nick Wellnhofer <wellnho...@aevum.de>
Committed: Fri Mar 4 13:56:14 2016 +0100

----------------------------------------------------------------------
 devel/bin/update_version | 31 +++++++++++++++++++++++++++----
 1 file changed, 27 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/cd6d3140/devel/bin/update_version
----------------------------------------------------------------------
diff --git a/devel/bin/update_version b/devel/bin/update_version
index a99ecdd..0ee157e 100755
--- a/devel/bin/update_version
+++ b/devel/bin/update_version
@@ -64,6 +64,15 @@ for my $path ('runtime/common/charmonizer.c', 
'runtime/common/charmonizer.main')
     write_file($path, $buf);
 }
 
+for my $path ('compiler/common/charmonizer.c', 
'compiler/common/charmonizer.main') {
+    $buf = read_file($path);
+    $buf =~ s/(cfc_version\[\]\s+=\s+)"[\d.]+"/$1"$x_y_z_version"/
+        or die "no match";
+    $buf =~ s/(cfc_major_version\[\]\s+=\s+)"[\d.]+"/$1"$x.$y"/
+        or die "no match";
+    write_file($path, $buf);
+}
+
 # Update CFC.pm.
 $buf = read_file('compiler/perl/lib/Clownfish/CFC.pm');
 $buf =~ s/(our \$VERSION\ +=\ +)'.+?'/$1'$x_yyyzzz_version'/g
@@ -112,11 +121,19 @@ $buf =~ s/\bmajor_version=[\d.]+/major_version=$x.$y/
     or die "no match";
 write_file( 'runtime/c/install.sh', $buf );
 
-# Update compiler/python/setup.py
-$buf = read_file('compiler/python/setup.py');
-$buf =~ s/(\bversion\s+=\s+)'[\d.]+'/$1'$x_y_z_version'/
+# Update runtime/c/install.bat
+$buf = read_file('runtime/c/install.bat');
+$buf =~ s/\bmajor_version=[\d.]+/major_version=$x.$y/
     or die "no match";
-write_file( 'compiler/python/setup.py', $buf );
+write_file( 'runtime/c/install.bat', $buf );
+
+# Update compiler/python/setup.py
+for my $path (qw( compiler/python/setup.py runtime/python/setup.py )) {
+    $buf = read_file($path);
+    $buf =~ s/(\bversion\s+=\s+)'[\d.]+'/$1'$x_y_z_version'/
+        or die "no match";
+    write_file( $path, $buf );
+}
 
 # Update POD in compiler/perl/lib/Clownfish/CFC/Perl/Build.pm
 $buf = read_file('compiler/perl/lib/Clownfish/CFC/Perl/Build.pm');
@@ -138,6 +155,12 @@ $buf =~ 
s/("Clownfish":\s+)"v\d+\.\d+\.\d+"/$1"v$x_y_z_version"/
     or die "no match";
 write_file( 'runtime/core/TestClownfish.cfp', $buf );
 
+# Update runtime/core/Clownfish/Docs/WritingClasses.md
+$buf = read_file('runtime/core/Clownfish/Docs/WritingClasses.md');
+$buf =~ s/("Clownfish":\s*)"v\d+\.\d+\.\d+"/$1"v$x_y_z_version"/g
+    or die "no match";
+write_file( 'runtime/core/Clownfish/Docs/WritingClasses.md', $buf );
+
 # Update all other Perl modules.
 find(\&update_pm_file, 'compiler/perl');
 find(\&update_pm_file, 'runtime/perl');

Reply via email to