3 # Make a fetchmail release. Must be run as root, to make RPMs.
4 # Dumps a release notice and diffs as a MIME multipart message
12 while ($i = shift @ARGV)
14 if ($i =~ /^(--diffs|-d)$/i)
20 if ($i =~ /^(--verbose|-v)$/i)
27 die "Error: Unknown option: $i\n";
31 $version=`grep 'VERSION *=' Makefile.in`;
32 $version =~ /VERSION *= *(.*)/;
37 open(ID, "rlog -h NEWS|");
39 last if /^symbolic names/;
48 if ($versions[0] eq $rcsid) {
49 $rcsid = $versions[0];
50 $oldid = $versions[1];
52 $rcsid = '<workfile>';
53 $oldid = $versions[0];
56 #$ENV{'PATH'} = "~esr/bin:/bin:/usr/bin";
58 print "Building $version release, RCS ID $rcsid, previous RCS ID $oldid\n";
60 print "### Test-building the software...\n";
61 if (system("su -c '(configure --disable-nls; make) $null' esr")) {
62 die("Compilation failure\n");
65 print "### Building the distribution...\n";
66 if (system("su -c 'make dist $null' esr")) {
67 die("Distribution-build failure\n");
70 print "### Building the RPMs...\n";
71 if (system("make rpm $null && chown esr *.rpm")) {
72 die("RPM-build failure\n");
75 open(REPORT, ">PREAMBLE.$$");
78 From: esr\@thyrsus.com (Eric S. Raymond)
79 To: fetchmail-friends\@ccil.org, fetchmail-announce\@ccil.org
80 Reply-To: esr\@thyrsus.com (Eric S. Raymond)
81 Subject: The $version release of fetchmail is available
82 FCC: ~/postings/outmail
84 The $version release of fetchmail is now available at the usual locations,
85 including <URL:http://$ENV{'WWWVIRTUAL'}/~esr/fetchmail>.
87 Here are the release notes:
91 # Extract the current notes
110 print REPORT "Diffs from the previous ($oldrcs) release follow as a MIME attachment."
112 print REPORT "By popular demand, diffs from the previous release have been omitted."
119 if ($rcsid eq '<workfile>') {
120 system("rcsdiff -u -r$oldid RCS/* 2>/dev/null >DIFFS.$$");
122 system("rcsdiff -u -r$oldid -r$rcsid RCS/* 2>/dev/null >DIFFS.$$");
125 system("wc <DIFFS.$$");
128 system "metasend -b -D 'fetchmail-$rcsid announcement' -m 'text/plain' -e 7bit -f PREAMBLE.$$ -n -D 'diff -u between -$oldrcs $rcsid' -m 'text/plain' -e 7bit -f DIFFS.$$ -o RELEASE.NOTES";
130 rename("PREAMBLE.$$", "RELEASE.NOTES");
132 system("chown esr RELEASE.NOTES");
133 chmod(0700, "RELEASE.NOTES");
135 #unlink("PREAMBLE.$$");
138 print "Building index page...\n";
139 system("rm -f index.html; indexgen.sh");
141 print "Building test server list...\n";
142 system("rm -f testservers.html; testservers-gen.sh >testservers.html");
144 print "Making activity graph...";
149 # makerelease ends here