Release 1.9
4 files changed, 37 insertions(+), 18 deletions(-)

M Makefile
M README.md
M release-notes.xml
M showlabels.dtx.in
M Makefile +23 -15
@@ 2,14 2,22 @@ 
 #
 # Just for packaging -- not distributed
 
-# FIXME: add the usual step-by-step instructions for distribution,
-# and check that the bundle does match the suggestions at
-# <https://ctan.org/help/upload-pkg>.
+# Making a release:
+#
+#   * check the notes in release-notes.xml are up to date
+#   * change the VERSION variable below, to remove -SNAPSHOT
+#   * commit, and tag as 'n.m.r' as appropriate
+#   * hg update to that tag
+#   * `make dist`
+#   * submit to CTAN at https://ctan.org/upload
+#   * hg update to tip, re-add `-SNAPSHOT back to the VERSION,
+#     and add a new release-notes block in release-notes.xml,
+#     ready for the next update
+#
+# See also the suggestion at <https://ctan.org/help/upload-pkg>.
 
-VERSION=1.9-SNAPSHOT
-RELEASEDATE=2016 June 9
-#  following must be yyyy/mm/dd
-RELEASEDATEN=2016/06/09
+VERSION=1.9
+# RELEASEDATE comes from the repository
 DIST=showlabels-$(VERSION)
 
 COPYRIGHTYEARS=1999, 2001-09, 2013-21

          
@@ 37,11 45,10 @@ dist: $(DIST).tar.gz $(DIST).zip webpage
 $(DIST)/VERSION: $(DISTFILES) version.sed
 	rm -Rf $(DIST)
 	mkdir $(DIST)
-	for f in $(DISTFILES); do cp $$f $(DIST)/$$f; done
-	$(edit) -f make-standalone.sed showlabels.html >$(DIST)/showlabels.html
+	cp $(DISTFILES) $(DIST)
+	$(edit) -f make-standalone.sed -e '/@RELEASENOTES@/r release-notes.html' showlabels.html >$(DIST)/showlabels.html
 	$(edit) README.md >$(DIST)/README
 	echo '@VERSIONX@' | $(edit) >$(DIST)/VERSION
-#	echo $(DIST) >$(DIST)/VERSION
 
 webpage-tarball.tar: $(DIST).tar.gz $(DIST).zip $(DIST)/VERSION \
 		showlabels.html showlabels.pdf lppl.txt release-notes.html

          
@@ 85,25 92,26 @@ release-notes.tmpdtx: release-notes.xml
 	rm -f $@
 	xsltproc tools/release-notes-dtx.xslt $< | sed 's/^/% /' >$@.tmp && mv $@.tmp $@
 
-# In version.sed, include substutitions
+# In version.sed, include substitutions
 #
 #   VERSION -> version from this file
 #   VERSIONX -> $(VERSION), in release versions, or $(VERSION)-mercurialid for snapshots
 #   VCSINFO -> mercurial release identifiers
+#   RELEASEDATE -> readable date
+#   RELEASEDATEN -> date in yyyy/mm/dd format required by LaTeX
+#   COPYRIGHTYEARS -> hand-maintained at the top
 version.sed: Makefile .hg
 	rm -f $@
 	if expr $(VERSION) : '.*SNAPSHOT' >/dev/null; then \
 	  { echo 's|@VERSION@|$(VERSION)|'; \
 	    echo 's|@COPYRIGHTYEARS@|$(COPYRIGHTYEARS)|'; \
-	    hg parent --template 's|@VERSIONX@|$(VERSION)-{node|short}|g\ns|@RELEASEDATE@|{date|shortdate}|g\ns|@RELEASEDATEN@|{date|shortdate}|g\ns|@VCSINFO@|{node|short}, {date|rfc3339date}|\n' | sed '/DATEN/s|-|/|g' ; \
+	    hg parent --template 's|@VERSIONX@|$(VERSION)-{node|short}|g\ns|@RELEASEDATE@|{date(date,"%Y %B %e")}|g\ns|@RELEASEDATEN@|{date|shortdate}|g\ns|@VCSINFO@|{node|short}, {date|rfc3339date}|\n' | sed '/DATEN/s|-|/|g' ; \
 	  } >version.sed; \
 	else \
 	  { echo 's|@VERSION@|$(VERSION)|g'; \
 	    echo 's|@VERSIONX@|$(VERSION)|g'; \
-	    echo 's|@RELEASEDATE@|$(RELEASEDATE)|g'; \
-	    echo 's|@RELEASEDATEN@|$(RELEASEDATEN)|g'; \
 	    echo 's|@COPYRIGHTYEARS@|$(COPYRIGHTYEARS)|'; \
-	    hg parent --template 's|@VCSINFO@|{node|short}, {date|rfc3339date}|\n'; \
+	    hg parent --template 's|@RELEASEDATE@|{date(date,"%Y %B %e")}|g\ns|@RELEASEDATEN@|{date|shortdate}|g\ns|@VCSINFO@|{node|short}, {date|rfc3339date}|\n'; \
 	  } >version.sed; \
 	fi
 

          
M README.md +2 -2
@@ 34,8 34,8 @@ Links:
   * The source code for the package is maintained
     [at sourcehut](https://hg.sr.ht/~nxg/showlabels).
 
-  * There's an [issue tracker](https://todo.sr.ht/~nxg/showlabels) also at sourcehut.
-    Or you can just mail me.
+  * There's also an [issue tracker](https://todo.sr.ht/~nxg/showlabels)
+    at sourcehut.  Or you can just mail me.
 
 This work is Copyright @COPYRIGHTYEARS@, Norman Gray, and may be
 distributed and/or modified under the conditions of the LaTeX Project

          
M release-notes.xml +5 -1
@@ 2,7 2,7 @@ 
 
 <release>
   <version>1.9</version>
-  <date>YYYY MMM DD</date>
+  <date>2021-10-09</date>
 <note>
 <ul>
   <li>Robustness fix: macros in arguments are now handled, so that

          
@@ 12,6 12,10 @@ 
   can now take a one-argument command.</li>
   <li>The macro <code>\showlabeltype</code> expands to the current
   label type, for possible use in <code>\showlabelsetlabel</code>.</li>
+  <li>The code has moved from Bitbucket to
+  <a href='https://sourcehut.org'>Sourcehut</a>: the new repository is
+  <a href='https://hg.sr.ht/~nxg/showlabels'>https://hg.sr.ht/~nxg/showlabels</a>.
+  The issues links in the list below are therefore broken.</li>
 </ul>
 </note>
 </release>

          
M showlabels.dtx.in +7 -0
@@ 328,7 328,14 @@ 
 % changed the name to `showlabel.sty'.
 %
 % \subsection{Release notes}
+% \begingroup
+% \iffalse the following are variously unsatisfactory
+%   \def~{\texttt{\textasciitilde}}
+%   \def~{$\sim$}
+% \fi
+% \catcode`\~=12
 % \iffalse @RELEASENOTES@ \fi
+% \endgroup
 %
 % \StopEventually{}
 %