Permalink
Browse files

Packaging

  • Loading branch information...
1 parent d7dacdd commit f44f163bcd7443cc0c5c788de2601dc3c4d2910a Jeffrey Kegler committed May 26, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 bump_version
View
8 bump_version
@@ -12,10 +12,11 @@ chomp( my $LATEST =
warn "Bumping -> $LATEST\n";
-my ( $minor, $micro ) = ( $LATEST =~ m/\A 0 [.] (\d\d\d) [_]? (\d\d\d) /xms );
+my ( $major, $minor, $micro ) = ( $LATEST =~ m/\A (\d+) [.] (\d\d\d) [_]? (\d\d\d) /xms );
if ( not defined $micro ) {
die "bump_version Cannot handle new version number: $LATEST";
}
+$major += 0;
$micro += 0;
$minor += 0;
@@ -32,7 +33,7 @@ END_OF_LIST
for my $versioned_file (@versioned_files) {
say STDERR $versioned_file;
my $file = do { local ( @ARGV, $/ ) = ($versioned_file); <> };
- $file =~ s/(\$VERSION \s+ = \s+ ['] ) \d [.] \d\d\d [_.] \d\d\d /$1${LATEST}/xms;
+ $file =~ s/(\$VERSION \s+ = \s+ ['] ) \d+ [.] \d\d\d [_]? \d\d\d /$1${LATEST}/xms;
open my $out, '>', $versioned_file;
print $out $file;
} ## end for my $versioned_file (@versioned_files)
@@ -47,6 +48,9 @@ for my $configure_ac_file (
say STDERR $configure_ac_file;
my $file = do { local ( @ARGV, $/ ) = ($configure_ac_file); <> };
$file =~ s{
+ ( m4_define [(] [\[] marpa_major_version [\]] [,] \s* [\[] ) \d+ ( [\]] )
+ }{$1${major}$2}xms;
+ $file =~ s{
( m4_define [(] [\[] marpa_minor_version [\]] [,] \s* [\[] ) \d+ ( [\]] )
}{$1${minor}$2}xms;
$file =~ s{

0 comments on commit f44f163

Please sign in to comment.