INN commit: trunk (Makefile support/mksnapshot)

INN Commit Russ_Allbery at isc.org
Mon Nov 17 11:07:43 UTC 2008


    Date: Monday, November 17, 2008 @ 03:07:43
  Author: iulius
Revision: 8164

Add support for generating beta releases.

Modified:
  trunk/Makefile
  trunk/support/mksnapshot

--------------------+
 Makefile           |   17 ++++++++++++++---
 support/mksnapshot |   18 +++++++++++++++++-
 2 files changed, 31 insertions(+), 4 deletions(-)

Modified: Makefile
===================================================================
--- Makefile	2008-11-17 08:56:55 UTC (rev 8163)
+++ Makefile	2008-11-17 11:07:43 UTC (rev 8164)
@@ -29,7 +29,11 @@
 TARFILE     = $(TARDIR).tar
 
 ##  The directory to use when building a snapshot.
+ifdef SNAPNUMBER
+SNAPDIR     = inn-$(VERSION)b$(SNAPNUMBER)
+else
 SNAPDIR     = inn-$(SNAPSHOT)-$(SNAPDATE)
+endif
 
 ##  DISTDIRS gets all directories from the MANIFEST, SNAPDIRS gets the same
 ##  but for a snapshot, and DISTFILES gets all regular files.  Anything not
@@ -223,6 +227,8 @@
 ##  Make a snapshot.  This is like making a release, except that we don't do
 ##  the ChangeLog thing and we don't change the version number.  We also
 ##  assume that SNAPSHOT has been set to the appropriate current branch.
+##  If SNAPNUMBER is empty, it is an automatic generation.  Otherwise,
+##  it is a beta release.
 snapshot:
 	rm -rf $(SNAPDIR)
 	rm -f inn*.tar.gz
@@ -231,9 +237,14 @@
 	set -e ; for f in `sed $(DISTFILES) MANIFEST` ; do \
 	    cp $$f $(SNAPDIR)/$$f ; \
 	done
-	cp README.snapshot $(SNAPDIR)/
-	sed 's/= prerelease/= $(SNAPDATE) snapshot/' \
-	    Makefile.global.in > $(SNAPDIR)/Makefile.global.in
+	if [ "x$(SNAPNUMBER)" != "x" ] ; then \
+	    sed 's/= prerelease/= b$(SNAPNUMBER) version/' \
+	        Makefile.global.in > $(SNAPDIR)/Makefile.global.in ; \
+	else \
+	    cp README.snapshot $(SNAPDIR)/ ; \
+	    sed 's/= prerelease/= $(SNAPDATE) snapshot/' \
+	        Makefile.global.in > $(SNAPDIR)/Makefile.global.in ; \
+	fi
 	find $(SNAPDIR) -type f -print | xargs touch -t `date +%m%d%H%M.%S`
 	tar cf $(SNAPDIR).tar $(SNAPDIR)
 	$(GZIP) -9 $(SNAPDIR).tar

Modified: support/mksnapshot
===================================================================
--- support/mksnapshot	2008-11-17 08:56:55 UTC (rev 8163)
+++ support/mksnapshot	2008-11-17 11:07:43 UTC (rev 8164)
@@ -15,16 +15,32 @@
 ##  This script takes one argument, a string representing what tree the
 ##  snapshot is being taken from.  Generally this string is either CURRENT or
 ##  STABLE.
+##  If this argument is BETA, a second argument is needed:  the number of the
+##  beta version (for instance 1 or 2).
+##
+##  Examples of use:
+##
+##    support/mksnapshot CURRENT
+##    support/mksnapshot BETA 1
 
 set -e
 
 date=`date -u +%Y%m%d`
 tree="$1"
+
 if [ -z "$tree" ] ; then
     echo "$0: no tree name specified" >&2
     exit 1
 fi
 
+if [ "$tree" = "BETA" ] ; then
+    number="$2"
+    if [ -z "$number" ] ; then
+        echo "$0: no version specified for $tree" >&2
+        exit 1
+    fi
+fi
+
 exec > snapshot.log 2>&1
 
 ./autogen
@@ -48,4 +64,4 @@
 <inn-workers at isc.org> mailing list.  See README for more information.
 EOF
 
-make snapshot SNAPSHOT="$tree" SNAPDATE="$date"
+make snapshot SNAPSHOT="$tree" SNAPDATE="$date" SNAPNUMBER="$number"




More information about the inn-committers mailing list