From: Graham Knop Date: Thu, 29 Oct 2015 20:37:46 +0000 (-0400) Subject: allow forcing version bump X-Git-Tag: v0.003000~53 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FDistar.git;a=commitdiff_plain;h=40635bc95f95d6b36ab8ae82222b63f2a89db3d3 allow forcing version bump --- diff --git a/helpers/bump-version b/helpers/bump-version index af3ecad..4e0ebab 100755 --- a/helpers/bump-version +++ b/helpers/bump-version @@ -8,6 +8,7 @@ use File::Temp (); GetOptions( "git" => \my $git, + "force" => \my $force, ) or die("Error in command line arguments\n"); my ($old_version, $bump) = @ARGV; @@ -81,7 +82,7 @@ for my $file (sort keys %files) { my $line = $lines[$ln]; if ($lines[$ln] =~ $re) { die "unable to bump version number in $file from $old_version, found $3\n" - if $3 ne $old_version; + if !$force && $3 ne $old_version; my $comment = ($5 ? $5 . $new_vstring : ''); my $new_line = "$1'$new_decimal'$4$comment$6"; $file_diff .= <<"END_DIFF";