X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/e89a0fc094c1edc4382e1b218c7f3fd50676101d..86e90c58f46dd13254e0dc38b9eea37589ace457:/packaging/release-rsync diff --git a/packaging/release-rsync b/packaging/release-rsync index ddd8bedd..0b906c43 100755 --- a/packaging/release-rsync +++ b/packaging/release-rsync @@ -61,33 +61,11 @@ die "There is no .git dir in the current directory.\n" unless -d '.git'; die "'a' must not exist in the current directory.\n" if -e 'a'; die "'b' must not exist in the current directory.\n" if -e 'b'; -my $status = `git status`; -die "The checkout is not clean:\n", $status unless $status =~ /\nnothing to commit \(working directory clean\)/; -my($cur_branch) = $status =~ /^# On branch (.+)\n/; -if ($cur_branch ne $master_branch) { - print "The checkout is not on the $master_branch branch.\n"; - exit 1 if $master_branch ne 'master'; - print "Do you want to release branch $cur_branch? [n] "; - $_ = ; - exit 1 unless /^y/i; - $master_branch = $cur_branch; -} - -if (-d 'patches/.git') { - $status = `cd patches && git status`; - die "The *patches* checkout is not clean:\n", $status unless $status =~ /\nnothing to commit \(working directory clean\)/; - ($cur_branch) = $status =~ /^# On branch (.+)\n/; - if ($cur_branch ne $master_branch) { - print "The *patches* checkout is on branch $cur_branch, not branch $master_branch.\n"; - print "Do you want to change it to branch $master_branch? [n] "; - $_ = ; - exit 1 unless /^y/i; - system "cd patches && git checkout '$master_branch'"; - } -} +require 'packaging/git-status.pl'; +check_git_state($master_branch, 1, 1); my $confversion; -open(IN, '<', 'configure.in') or die $!; +open(IN, '<', 'configure.ac') or die $!; while () { if (/^RSYNC_VERSION=(.*)/) { $confversion = $1; @@ -95,7 +73,7 @@ while () { } } close IN; -die "Unable to find RSYNC_VERSION in configure.in\n" unless defined $confversion; +die "Unable to find RSYNC_VERSION in configure.ac\n" unless defined $confversion; open(IN, '<', 'OLDNEWS') or die $!; $_ = ; @@ -203,7 +181,7 @@ print "\n", $break, < $finalversion, 'Release:' => $release, '%define fullversion' => "\%{version}$pre", 'Released' => "$version.", '%define srcdir' => $srcdir ); my @tweak_files = ( glob('packaging/*.spec'), glob('packaging/*/*.spec'), glob('*.yo'), - qw( configure.in rsync.h NEWS OLDNEWS options.c ) ); + qw( configure.ac rsync.h NEWS OLDNEWS options.c ) ); foreach my $fn (@tweak_files) { open(IN, '<', $fn) or die $!; @@ -285,7 +263,7 @@ print $break, <