diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2010-03-28 17:29:36 +0200 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2010-03-28 17:33:33 +0200 |
commit | 4835749509a65dfe449fbcbdb6386af2cb768c10 (patch) | |
tree | 005aafab002c8a44f581fbae07523cb78df04a0e /dist-tools/makerelease.pl | |
parent | fe5aab091d09a755f7606f3eac57970efd34e2bc (diff) | |
download | fetchmail-4835749509a65dfe449fbcbdb6386af2cb768c10.tar.gz fetchmail-4835749509a65dfe449fbcbdb6386af2cb768c10.tar.bz2 fetchmail-4835749509a65dfe449fbcbdb6386af2cb768c10.zip |
Update for 6.3.15 release.
Diffstat (limited to 'dist-tools/makerelease.pl')
-rwxr-xr-x | dist-tools/makerelease.pl | 81 |
1 files changed, 38 insertions, 43 deletions
diff --git a/dist-tools/makerelease.pl b/dist-tools/makerelease.pl index 9578eb52..f32f6f32 100755 --- a/dist-tools/makerelease.pl +++ b/dist-tools/makerelease.pl @@ -1,16 +1,14 @@ -#!/usr/bin/env perl +#!/usr/bin/perl -w # # Make a fetchmail release. # Dumps a release notice and diffs as a MIME multipart message # in RELEASE_NOTES # + use POSIX qw(strftime); $tmp = $ENV{TMPDIR} || $ENV{TMP} || $ENV{TEMP} || "/tmp"; -die "This script ($0) needs to be updated for the Git-orious repo."; - $project = "fetchmail"; -$svnrepos = "http://mknod.org/svn/$project"; $website = "http://developer.berlios.de/projects/$project"; $mailfrom = "<$project-devel-owner\@lists.berlios.de> (Fetchmail Development Team)"; @@ -25,6 +23,7 @@ while ($i = shift @ARGV) { if ($i =~ /^(--diffs|-d)$/i) { + die "$0 does not yet work with --diffs - needs to be updated for Git first!"; $diffs = 1; next; } @@ -40,7 +39,7 @@ while ($i = shift @ARGV) } # extract version from source -$version=`grep 'AC_INIT' configure.ac`; +$version =`grep 'AC_INIT' configure.ac`; $version =~ /AC_INIT\([^,]*,\[?([0-9.rc-]+)\]?\,.*\)/; $version = $1; die "cannot determine version" unless defined $1; @@ -48,20 +47,21 @@ $tag = "RELEASE_$version"; $tag =~ tr/./-/; # extract existing tags -open(ID, "svn ls \"$svnrepos/tags\" | sort -t- -k1,1 -k2,2n -k3,3n |") || die "cannot run svn ls: $!\naborting"; +open(ID, "git tag | sort -t- -k1,1 -k2,2n -k3,3n |") || die "cannot run git tag: $!\naborting"; while (<ID>) { - if (m{^(RELEASE_.*)/}) { - unshift(@versions, $1); - } + chomp; + if (m{^(RELEASE_.*)$}) { + unshift(@versions, $1); + } } -close ID || die "svn ls failed, aborting"; +close ID || die "git tag failed, aborting"; if ($versions[0] eq $tag) { - $tag = $versions[0]; - $oldtag = $versions[1]; + $tag = $versions[0]; + $oldtag = $versions[1]; } else { - $tag = '<workfile>'; - $oldtag = $versions[0]; + $tag = '<workfile>'; + $oldtag = $versions[0]; } $pwd = `pwd`; chomp $pwd; @@ -71,24 +71,19 @@ $ENV{PATH} .= ":$pwd/dist-tools:$pwd/dist-tools/shipper"; print "Building $version release, tag $tag, previous tag $oldtag\n"; if (-d "autom4te.cache") { - system("rm -rf autom4te.cache") - and die "Failure in removing autom4te.cache"; + system("rm -rf autom4te.cache") + and die "Failure in removing autom4te.cache"; } -if (system("autoreconf -isv")) { +if (system("autoreconf -ifs") . ($verbose ? 'v' : '')) { die("Failure in regenerating autoconf files\n"); } print "### Test-building the software...\n"; -if (system("mkdir -p autobuild && cd autobuild && ../configure -C --silent && make -s clean && make check distcheck")) { +if (system("mkdir -p autobuild && cd autobuild && ../configure -C --silent && make -s clean && make " . ($verbose ? '' : '-s') . " check distcheck")) { die("Compilation failure\n"); } -# print "### Building the RPMs...\n"; -# if (system("cd autobuild && cp ../fetchmail.xpm . && buildrpms $project-${version}.tar.bz2 $null")) { -# die("RPM-build failure\n"); -# } - open(REPORT, ">$tmp/$project.PREAMBLE.$$"); print REPORT <<EOF; @@ -108,16 +103,16 @@ EOF # Extract the current notes open(NEWS, "NEWS"); while (<NEWS>) { - if (/^$project/) { - print REPORT $_; - last; - } + if (/^$project/) { + print REPORT $_; + last; + } } while (<NEWS>) { - if (/^$project/) { - last; - } - print REPORT $_; + if (/^$project/) { + last; + } + print REPORT $_; } $oldver = $oldtag; @@ -127,26 +122,26 @@ $oldver =~ s/^RELEASE_//; if ($diffs) { print REPORT "Diffs from the previous ($oldver) release follow as a MIME attachment." } else { - print REPORT "By popular demand, diffs from the previous release have been omitted." + print REPORT "By popular demand, diffs from the previous release have been omitted." } close(NEWS); close(REPORT); -if ($tag eq '<workfile>') { - system("svn diff -r$oldtag $errnull >$tmp/$project.DIFFS.$$"); -} else { - system("svn diff -r$oldtag -r$tag $errnull >$tmp/$project.DIFFS.$$"); -} -print "Diff size:"; -system("wc <$tmp/$project.DIFFS.$$"); - if ($diffs) { + if ($tag eq '<workfile>') { + system("svn diff -r$oldtag $errnull >$tmp/$project.DIFFS.$$"); + } else { + system("svn diff -r$oldtag -r$tag $errnull >$tmp/$project.DIFFS.$$"); + } + print "Diff size:"; + system("wc <$tmp/$project.DIFFS.$$"); + system "metasend -b" - ." -D '$project-$tag announcement' -m 'text/plain' -e 7bit -f $tmp/$project.PREAMBLE.$$" - ." -n -D 'diff between $oldver and $version' -m 'text/plain' -e 7bit -f $tmp/$project.DIFFS.$$" - ." -o ANNOUNCE.EMAIL"; + ." -D '$project-$tag announcement' -m 'text/plain' -e 7bit -f $tmp/$project.PREAMBLE.$$" + ." -n -D 'diff between $oldver and $version' -m 'text/plain' -e 7bit -f $tmp/$project.DIFFS.$$" + ." -o ANNOUNCE.EMAIL"; } else { system("mv", "$tmp/$project.PREAMBLE.$$", "ANNOUNCE.EMAIL"); } |