[libmarpa-r2-perl] 01/12: Work on utility
Jonas Smedegaard
dr at jones.dk
Sat May 17 21:24:05 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to annotated tag Marpa-R2-2.085_002
in repository libmarpa-r2-perl.
commit 74dd1791b0585d3bbca5d20efa2c66a43d6eea47
Author: Jeffrey Kegler <JKEGL at cpan.org>
Date: Tue Apr 15 17:38:11 2014 -0700
Work on utility
---
bump_version | 47 ++++++++++++++++++++++++++++++++---------------
cpan/Changes | 4 ++++
2 files changed, 36 insertions(+), 15 deletions(-)
diff --git a/bump_version b/bump_version
index 1e9f424..164fcae 100644
--- a/bump_version
+++ b/bump_version
@@ -7,21 +7,39 @@ use autodie;
use English qw( -no_match_vars );
use IPC::Cmd;
-chomp( my $LATEST =
- qx(grep '^[0-9]' cpan/Changes | head -1 | awk '{print \$1}') );
+my $latest;
+LINE: {
+ open my $changes_fh, q{<}, 'cpan/Changes';
+ while ( my $line = <$changes_fh> ) {
+ if ( $line =~ m/ \A \d /xms ) {
+ $latest = $line;
+ chomp $latest;
+ last LINE;
+ }
+ } ## end while ( my $line = <$changes_fh> )
+} ## end LINE:
-warn "Bumping -> $LATEST\n";
+die "Could not find latest change" if not defined $latest;
+warn "Bumping -> $latest\n";
-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";
+my ( $major, $minor, $underscore, $micro, $libmarpa_major, $libmarpa_minor,
+ $libmarpa_micro )
+ = (
+ $latest =~ m/\A
+ (\d+) [.] (\d\d\d) ([_]?) (\d\d\d)
+ \s+ [(] libmarpa \s+ (\d+) [.] (\d+) [.] (\d+) [)]
+ /xms
+ );
+
+if ( not defined $libmarpa_micro ) {
+ die "bump_version Cannot handle new version number: $latest";
}
+
$major += 0;
$minor += 0;
$micro += 0;
-my $libmarpa_major = $major+3;
-my $libmarpa_minor = $minor+100;
-my $libmarpa_micro = $micro+100;
+my $perlish_version = sprintf '%d%s%.3d%s%.3d', $major, q{.}, $minor,
+ $underscore, $micro;
my @versioned_files = split /\n/xms, <<'END_OF_LIST';
cpan/html/lib/Marpa/R2/HTML.pm
@@ -48,7 +66,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${perlish_version}/xms;
open my $out, '>', $versioned_file;
print $out $file;
} ## end for my $versioned_file (@versioned_files)
@@ -91,7 +109,7 @@ for my $configure_ac_file (
}{$1${libmarpa_micro}$2}xms;
open my $out, '>', $configure_ac_file;
print $out $file;
-} ## end for my $configure_ac_file ( qw( cpan/libmarpa/dev/dist/configure.ac...))
+} ## end for my $configure_ac_file ( qw( cpan/libmarpa/ac/configure.ac...))
{
open my $out, '>', 'cpan/libmarpa/public/marpa.h-version';
@@ -110,13 +128,12 @@ for my $configure_ac_file (
chdir 'cpan';
die qq{"perl Build.PL" failed: $!}
if not IPC::Cmd::run(
- command => [ $EXECUTABLE_NAME, 'Build.PL' ],
- verbose => 1
+ command => [ $EXECUTABLE_NAME, 'Build.PL' ],
+ verbose => 1
);
die qq{"./Build distmeta" failed: $!}
if
not IPC::Cmd::run( command => [ './Build', 'distmeta' ], verbose => 1 );
chdir 'meta';
die qq{"make all" in cpan/meta/ directory failed: $!}
- if
- not IPC::Cmd::run( command => [ 'make', 'all' ], verbose => 1 );
+ if not IPC::Cmd::run( command => [ 'make', 'all' ], verbose => 1 );
diff --git a/cpan/Changes b/cpan/Changes
index 5a2d048..d6ae04d 100644
--- a/cpan/Changes
+++ b/cpan/Changes
@@ -15,6 +15,10 @@
Revision history for Marpa::R2
+2.085_001 (libmarpa 3.0.0) Tue Apr 15 17:11:40 PDT 2014
+
+ * New libmarpa versioning
+
2.085_000
* New series of developer's releases.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmarpa-r2-perl.git
More information about the Pkg-perl-cvs-commits
mailing list