Subject: | makefile_PL flag not honored and svn status incorrectly parsed [patch] |
I really like the v2.0 changes to work with multiple vcs and the built
in support for Module::Build, but I found a few bugs when working with
svn and Module::Build.
1) Setting the makefile_PL, makefile and make flags in .releaserc
doesn't seem to have any impact. I added code in the patch to update
$self->{Makefile.PL/Makefile/make} based on the $self->config values.
2) The regex that parses the svn status output isn't treating the
multi-line string correctly. The ^ needs to be moved to line where the
comparison is made or the m flag needs to be moved to the regex
definition. I did the latter in the patch.
I also removed an erroneous, duplicate comment from the release script.
Thanks for the really convenient module.
-Mark
Subject: | module-release-build-svn-20090605.patch |
diff --git a/lib/Release.pm b/lib/Release.pm
index 68264ef..51cfba4 100644
--- a/lib/Release.pm
+++ b/lib/Release.pm
@@ -271,6 +271,12 @@ sub _process_configuration
$self->{passive_ftp} =
($self->config->passive_ftp && $self->config->passive_ftp =~ /^y(es)?/) ? 1 : 0;
+ $self->{'Makefile.PL'} = $self->config->get('makefile_PL')
+ if $self->config->exists('makefile_PL');
+ $self->{Makefile} = $self->config->get('makefile')
+ if $self->config->exists('makefile');
+ $self->{make} = $self->config->get('make') if $self->config->exists('make');
+
my @required = qw( );
my $ok = 1;
diff --git a/lib/SVN.pm b/lib/SVN.pm
index 994f09e..ce2048f 100644
--- a/lib/SVN.pm
+++ b/lib/SVN.pm
@@ -70,13 +70,13 @@ sub check_vcs
$svn_update =~ s/^(........)\s+\d+\s+\d+\s+\S+\s+(.*)$/$1 $2/mg;
my %message = (
- qr/^C......./ => 'These files have conflicts',
- qr/^M......./ => 'These files have not been checked in',
- qr/^........\*/ => 'These files need to be updated',
- qr/^P......./ => 'These files need to be patched',
- qr/^A......./ => 'These files were added but not checked in',
- qr/^D......./ => 'These files are scheduled for deletion',
- qr/^\?......./ => 'I don\'t know about these files',
+ qr/^C......./m => 'These files have conflicts',
+ qr/^M......./m => 'These files have not been checked in',
+ qr/^........\*/m => 'These files need to be updated',
+ qr/^P......./m => 'These files need to be patched',
+ qr/^A......./m => 'These files were added but not checked in',
+ qr/^D......./m => 'These files are scheduled for deletion',
+ qr/^\?......./m => 'I don\'t know about these files',
);
my @svn_states = keys %message;
@@ -84,7 +84,7 @@ sub check_vcs
my %svn_state;
foreach my $state (@svn_states)
{
- $svn_state{$state} = [ $svn_update =~ /$state\s+(.*)/gm ];
+ $svn_state{$state} = [ $svn_update =~ /$state\s+(.*)/g ];
}
my $count;
diff --git a/script/release b/script/release
index 0677111..d599cd7 100755
--- a/script/release
+++ b/script/release
@@ -352,8 +352,6 @@ if( $release->config->cpan_user ) # not a dry run
}
-# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
-# Will we upload to PAUSE?
$release->load_mixin( 'Module::Release::Prereq' );
my $skip_prereqs = $opts{p} || $release->config->skip_prereqs;