summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-02-10 16:39:47 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-02-10 16:39:47 (GMT)
commit2db1ce5405f434b77a4c4ce58e20004ff844f0eb (patch)
tree4e1336162a0031f4ef7bcbc9ffdcab60f9c42290
parenta0519587e3e97cec157e46c35e4a1703d63b524e (diff)
downloadhdf5-2db1ce5405f434b77a4c4ce58e20004ff844f0eb.zip
hdf5-2db1ce5405f434b77a4c4ce58e20004ff844f0eb.tar.gz
hdf5-2db1ce5405f434b77a4c4ce58e20004ff844f0eb.tar.bz2
[svn-r239] Release fails if MANIFEST is not consistent with CVS/Entries. This
should prevent incomplete releases as a result of people forgetting to add files to MANIFEST.
-rwxr-xr-xbin/release58
1 files changed, 58 insertions, 0 deletions
diff --git a/bin/release b/bin/release
index 9904c00..9a26116 100755
--- a/bin/release
+++ b/bin/release
@@ -57,6 +57,61 @@ sub setver ($;$$$) {
}
##############################################################################
+# Make sure MANIFEST contains all the necessary files. If we are running
+# under CVS then look at the CVS/Entries files to get the names that should
+# be in the manifest. Otherwise we really can't do anything.
+#
+sub manifest () {
+ my ($fname, %manifest);
+ my $nprobs=0;
+
+ # We can't do anything if we're not running under cvs.
+ return "" unless -d "CVS";
+
+ # Read the files from the manifest.
+ open MANIFEST, "MANIFEST" or die "unable to read manifest";
+ while (<MANIFEST>) {
+ chomp;
+ $manifest{$_} = 1;
+ }
+ close MANIFEST;
+
+ # Read files from CVS/Entries
+ open FIND, "find . -name Entries -print | sort |" or
+ die "unable to find CVS entries";
+ while ($fname=<FIND>) {
+ chomp $fname;
+ my ($dir) = $fname =~ m%(.*)/CVS/Entries%;
+ open ENTRIES, $fname or die "unable to open $fname";
+ while (<ENTRIES>) {
+ my ($ename) = m%^/(.*?)/%;
+ $ename = "$dir/" . $ename;
+ if (exists $manifest{$ename}) {
+ delete $manifest{$ename};
+ } else {
+ print "NEW: $ename\n";
+ $nprobs++;
+ }
+ }
+ close ENTRIES;
+ }
+ close FIND;
+
+ for (sort keys %manifest) {
+ print "OLD: $_\n";
+ $nprobs++;
+ }
+
+ if ($nprobs) {
+ print "Please add the new files to MANIFEST and remove the old\n";
+ print "files and try again. The MANIFEST should contain all files\n";
+ print "that are to be distributed for a release.\n";
+ exit 1;
+ }
+}
+
+
+##############################################################################
# Build a release
#
sub release (@) {
@@ -64,6 +119,9 @@ sub release (@) {
my ($ver, $status, $created_symlink);
local $_;
+ # Make sure no one forgot to update MANIFEST
+ manifest;
+
# Make sure the version number is correct.
print "Building an HDF release...\n";
print "HDF version to release [", ($ver=getver), "] ";