Prepare release 1.1-b1.

This deals with the various outstanding issues, but doesn't include
the separate work to use QUDT2, which will happen next.

This revision includes some reworking of the way that the version
numbers are wrangled, in a slight simplification.
8 files changed, 32 insertions(+), 29 deletions(-)

M Makefile.in
M README.developer
M README.md
M RELEASE-NOTES
M configure.ac
M src/c/Makefile.in
M src/package-info.txt.in
M unity.html.in
M Makefile.in +8 -11
@@ 2,7 2,6 @@ prefix=@prefix@
 
 PACKAGE_NAME=@PACKAGE_NAME@
 PACKAGE_VERSION=@PACKAGE_VERSION@
-RELEASE_DATE=@RELEASE_DATE@
 IN_SOURCE_TREE=@IN_SOURCE_TREE@
 
 #DIST-

          
@@ 41,7 40,7 @@ all:
 #DIST-
 
 dist: metadata.sed
-	d=`echo @VERSIONIDENT@|sed -f metadata.sed`; $(MAKE) DIST=$$d $$d.zip $$d.jar
+	d=`echo $(PACKAGE_NAME)-@VERSIONIDENT@|sed -f metadata.sed`; $(MAKE) DIST=$$d $$d.zip $$d.jar
 
 $(DIST).tar: $(DIST)
 	rm -f $@

          
@@ 78,7 77,7 @@ dist: metadata.sed
 
 # The webpage-tarball target is what is uploaded to the distribution page.
 webpage-tarball.tar: metadata.sed
-	d=`echo @VERSIONIDENT@|sed -f metadata.sed`; $(MAKE) DIST=$$d webpage-tarball-$$d.tar
+	d=`echo $(PACKAGE_NAME)-@VERSIONIDENT@|sed -f metadata.sed`; $(MAKE) DIST=$$d webpage-tarball-$$d.tar
 webpage-tarball-$(DIST).tar: unity.html.in $(DIST) $(DIST).zip $(DIST).jar README.md RELEASE-NOTES
 	rm -f webpage-tarball.tar
 	if test -d webpage-tempdir; then rm -Rf webpage-tempdir; else :; fi; mkdir webpage-tempdir

          
@@ 106,7 105,11 @@ unity.html: unity.html.in Makefile metad
 	$(edit) unity.html.in >unity.html
 
 # some of this could go in configure.ac, but then it gets complicated to make
-# the distribution version of the Makefile
+# the distribution version of the Makefile.
+# The VERSIONIDENT is the {latesttag} if {latesttagdistance}=0,
+# or @PACKAGE_VERSION@-snap.{node|short} if {latesttagdistance}>0.
+# VERSIONDATE is the date of the current revision.
+# Thus we should always be at the tag marking a revision, before building the distribution.
 metadata.sed: Makefile .hg
 	{ echo 's/@PACKAGE_VERSION''@/@PACKAGE_VERSION@/g'; \
 	  echo 's|@LIBRARY_HOMEPAGE''@|@LIBRARY_HOMEPAGE@|g'; \

          
@@ 114,13 117,7 @@ metadata.sed: Makefile .hg
 	  echo 's|@LIBRARY_BUGPARADE''@|@LIBRARY_BUGPARADE@|g'; \
 	  echo 's|@LIBRARY_DISTURL''@|@LIBRARY_DISTURL@|g'; \
 	  echo 's|@PACKAGE_VERSION_INTEGER''@|@PACKAGE_VERSION_INTEGER@|g'; \
-	  if expr @PACKAGE_VERSION@ : '.*SNAPSHOT'>/dev/null; then \
-	    hg log -r 'p1()' --template 's/@VERSIONIDENT''@/@PACKAGE_NAME@-@PACKAGE_VERSION@-{node|short}/\ns/@VERSIONDATE''@/{date(localdate(date,0),"%Y %B %e")}/g\n'; \
-	  else \
-	    echo 's/@VERSIONIDENT''@/@PACKAGE_NAME@-@PACKAGE_VERSION@/'; \
-	    echo 's/@VERSIONDATE''@/@RELEASE_DATE@/g'; \
-	  fi; \
-	  hg log -r 'p1()' --template 's|@REPO_REVISION''@|{node|short}|\ns|@REPO_VERSIONSTRING''@|Hg-{node|short} ({ifeq(branch, "default", "", "branch {branch}, ")}tag {latesttag}{ifeq(latesttagdistance, 0, "", " + {latesttagdistance}")})|\ns|@REPO_ISODATE''@|{date|rfc3339date}|\ns|@REPO_ISODATEZ''@|{date(localdate(date,0),"%Y-%m-%dT%H:%M:%SZ")}|\ns|@REPO_DATE''@|{date(date, "%Y %B %e")}|\n'; \
+	  hg log -r 'p1()' --template 's|@REPO_REVISION''@|{node|short}|\ns|@REPO_VERSIONSTRING''@|Hg-{node|short} ({ifeq(branch, "default", "", "branch {branch}, ")}tag {latesttag}{ifeq(latesttagdistance, 0, "", " + {latesttagdistance}")})|\ns|@REPO_ISODATE''@|{date|rfc3339date}|\ns|@REPO_ISODATEZ''@|{date(localdate(date,0),"%Y-%m-%dT%H:%M:%SZ")}|\ns|@REPO_DATE''@|{date(date, "%Y %B %e")}|\ns|@VERSIONIDENT@|{ifeq(latesttagdistance,0,"{latesttag}","@PACKAGE_VERSION@-snap.{node|short}")}|\ns|@VERSIONDATE''@|{date(date,"%Y %B %e")}|\n'; \
 	} >$@
 
 src/package-info-c.txt: src/package-info.txt.in metadata.sed

          
M README.developer +11 -4
@@ 118,16 118,23 @@ Making a release
 
 These instructions are (probably) for Norman only:
 
-  * Update the version number (remove "-SNAPSHOT") and date in configure.ac
+  * Possibly update the version number and date in configure.ac.
   * Check that RELEASE-NOTES are up to date
-  * Check in, and hg tag the revision
+  * Check in, and `hg tag` the revision with the version number in the
+    release.  This may be the same as that in configure.ac (eg, `1.1`), or with a
+    beta identifier appended (eg, `1.1-b1`) -- see [semver.org](https://semver.org).
+  * Hg update (back) to this tag.
   * `% autoconf; ./config.status --recheck && ./config.status && make clean && make check && make webpage-tarball.tar`
   * `cd $(DIST); ./configure && make check` (just to check everything's bundled up correctly)
   * Unpack `webpage-tarball.tar` on distribution page
     (<https://nxg.me.uk/dist/unity/>), and upload
     `$(DIST).tar.gz` and `$(DIST).jar` to `https://code.nxg.name/nxg/downloads`
-  * Change the version number in `configure.ac` to (v+1)-SNAPSHOT,
-    adjust `RELEASE_DATE` back to placeholder `YYYY Month DD`, and check in
+  * Update to the tip, again.
+  * If this was a release version (as opposed to a beta), then
+    increment the version number in `configure.ac` to the likely next release
+    (eg `1.1` -> `1.2`);
+    add another blank stanza for the likely next release (full or beta) to the RELEASE_NOTES;
+    and check in.
 
 The VOUnits standard document requires the presence of
 `src/grammar/unity-grammars.zip`, built using the Makefile in that directory.

          
M README.md +1 -1
@@ 324,4 324,4 @@ repository checkout](README.developer).
 [dist]:	https://purl.org/nxg/dist/unity
 
 [Norman Gray](https://nxg.me.uk)  
-@RELEASE_DATE@
+@VERSIONDATE@

          
M RELEASE-NOTES +1 -1
@@ 1,4 1,4 @@ 
-Release notes for version 1.X, yyyy-mm-dd
+Release notes for version 1.1-b1, 2022-04-10
 
   * Added `"1"` as an indicator of the ‘dimensionless expression’, in
     the VOUnits syntax (only).  This is slightly provisional,

          
M configure.ac +7 -8
@@ 1,11 1,8 @@ 
-AC_INIT(unity, 1.1-SNAPSHOT, norman.gray@glasgow.ac.uk)
-
-dnl  See README.developer for the procedure for making a release
-RELEASE_DATE='YYYY Month DD'
-dnl RELEASE_DATE='2014 May 13'
-
-AC_SUBST(RELEASE_DATE)
-AC_DEFINE_UNQUOTED(RELEASE_DATE, ["$RELEASE_DATE"], [Date the package was released])
+dnl  Give the version number as the next/target release version.
+dnl  Ie, do not include beta/rc numbers.
+dnl  See README.developer for notes on marking releases.
+dnl  The release date is generated from the date of the repository snapshot.
+AC_INIT(unity, 1.1, norman.gray@glasgow.ac.uk)
 
 AC_PREFIX_DEFAULT([/usr/local])
 

          
@@ 14,6 11,8 @@ AC_SUBST(LIBRARY_REPOSITORY, [https://hg
 AC_SUBST(LIBRARY_BUGPARADE, [https://todo.sr.ht/~nxg/unity])
 AC_SUBST(LIBRARY_DISTURL, [https://code.nxg.name/nxg/downloads])
 
+dnl  This integer matches the package-version at the top,
+dnl  and will be the same for (eg) all betas.
 PACKAGE_VERSION_INTEGER=[`echo ${PACKAGE_VERSION}-0 | awk -F'[^0-9]*' '{printf "%d 1000000* %d 1000* %d++p", $1,$2,$3}' | dc`]
 AC_SUBST(PACKAGE_VERSION_INTEGER)
 AC_DEFINE_UNQUOTED([PACKAGE_VERSION_INTEGER],

          
M src/c/Makefile.in +2 -2
@@ 183,8 183,8 @@ config.h.in: ../../configure.ac
 version.h: ../../metadata.sed Makefile
 	{ echo "#ifndef VERSION_H_LOADED"; \
 	  echo "#define VERSION_H_LOADED 1"; \
-	  echo "#define VERSIONIDENT \"@VERSIONIDENT""@\""; \
-	  echo "#define VERSIONDATE \"@VERSIONDATE""@\""; \
+	  echo '#define VERSIONIDENT "@VERSIONIDENT''@"'; \
+	  echo '#define VERSIONDATE "@VERSIONDATE''@"'; \
 	  echo "#endif"; } | sed -f ../../metadata.sed >$@
 TAGS:
 	etags *.c *.h

          
M src/package-info.txt.in +1 -1
@@ 44,7 44,7 @@ are as follows
 <dt>fits</dt>
 <dd>See
     FITS, 3.0 Sect.4.3
-    (<a href='http://dx.doi.org/10.1051/0004-6361/201015362'>W.D. Pence et al., A&A 524, A42, 2010</a>);
+    (<a href='http://dx.doi.org/10.1051/0004-6361/201015362'>W.D. Pence et al., A&amp;A 524, A42, 2010</a>);
     v4.0 Sect.4.3 (<a href='https://fits.gsfc.nasa.gov/fits_standard.html'>FITS standards page</a>));
     and further comments in the
     <a href='http://dx.doi.org/10.1051/0004-6361/201424653'>FITS WCS IV paper</a>.</dd>

          
M unity.html.in +1 -1
@@ 67,7 67,7 @@ the library</em>)</li>
 
 <div class='signature'>
 <a href='https://nxg.me.uk'>Norman Gray</a><br />
-@RELEASE_DATE@
+@VERSIONDATE@
 </div>
 </body>
 </html>