unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* bug: RELEASING should cover version & date in notmuch.1
@ 2011-11-06 19:58 Jani Nikula
  2011-11-18  2:26 ` [PATCH 1/3] build system: use $(filter ...) to test MAKECMDGOALS David Bremner
  0 siblings, 1 reply; 4+ messages in thread
From: Jani Nikula @ 2011-11-06 19:58 UTC (permalink / raw)
  To: notmuch, david


Hi, here's an actual bug for testing nmbug. ;)

Current notmuch man page (notmuch.1) has version 0.1 and date
2009-10-31. RELEASING should include a step for updating those. Or they
should be updated automagically by make.

BR,
Jani.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] build system: use $(filter ...) to test MAKECMDGOALS
  2011-11-06 19:58 bug: RELEASING should cover version & date in notmuch.1 Jani Nikula
@ 2011-11-18  2:26 ` David Bremner
  2011-11-18  2:26   ` [PATCH 2/3] build system: add target update-versions to propagate version David Bremner
  2011-11-18  2:26   ` [PATCH 3/3] RELEASING: document the semi-automated version propagation David Bremner
  0 siblings, 2 replies; 4+ messages in thread
From: David Bremner @ 2011-11-18  2:26 UTC (permalink / raw)
  To: notmuch; +Cc: David Bremner

From: David Bremner <bremner@debian.org>

This makes the test easier to extend to more targets. It also corrects
a bug where "special" targets were only detected when given alone.
---
 Makefile.local |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/Makefile.local b/Makefile.local
index 8b42136..10e6668 100644
--- a/Makefile.local
+++ b/Makefile.local
@@ -13,15 +13,11 @@ PACKAGE=notmuch
 IS_GIT=$(shell if [ -d .git ] ; then echo yes ; else echo no; fi)
 
 VERSION:=$(shell cat ${srcdir}/version)
-ifneq ($(MAKECMDGOALS),release)
-ifneq ($(MAKECMDGOALS),release-message)
-ifneq ($(MAKECMDGOALS),pre-release)
+ifeq ($filter release release-message pre-release,$(MAKECMDGOALS),)
 ifeq ($(IS_GIT),yes)
 VERSION:=$(shell git describe --match '[0-9.]*'|sed -e s/_/~/ -e s/-/+/ -e s/-/~/)
 endif
 endif
-endif
-endif
 
 UPSTREAM_TAG=$(subst ~,_,$(VERSION))
 DEB_TAG=debian/$(UPSTREAM_TAG)-1
-- 
1.7.7.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] build system: add target update-versions to propagate version
  2011-11-18  2:26 ` [PATCH 1/3] build system: use $(filter ...) to test MAKECMDGOALS David Bremner
@ 2011-11-18  2:26   ` David Bremner
  2011-11-18  2:26   ` [PATCH 3/3] RELEASING: document the semi-automated version propagation David Bremner
  1 sibling, 0 replies; 4+ messages in thread
From: David Bremner @ 2011-11-18  2:26 UTC (permalink / raw)
  To: notmuch; +Cc: David Bremner

From: David Bremner <bremner@debian.org>

The version from file "version" is propagated to the man page and the
python bindings via sed. Note that the git version is ignored because
of the check for MAKECMDGOALS.
---
 Makefile.local |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/Makefile.local b/Makefile.local
index 10e6668..775f393 100644
--- a/Makefile.local
+++ b/Makefile.local
@@ -12,8 +12,14 @@ PACKAGE=notmuch
 
 IS_GIT=$(shell if [ -d .git ] ; then echo yes ; else echo no; fi)
 
+ifeq ($(IS_GIT),yes)
+DATE:=$(shell git log --date=short -1 --pretty=format:%cd)
+else
+DATE:=$(shell date +%F)
+endif
+
 VERSION:=$(shell cat ${srcdir}/version)
-ifeq ($filter release release-message pre-release,$(MAKECMDGOALS),)
+ifeq ($(filter release release-message pre-release update-versions,$(MAKECMDGOALS)),)
 ifeq ($(IS_GIT),yes)
 VERSION:=$(shell git describe --match '[0-9.]*'|sed -e s/_/~/ -e s/-/+/ -e s/-/~/)
 endif
@@ -87,6 +93,12 @@ $(GPG_FILE): $(SHA1_FILE)
 .PHONY: dist
 dist: $(TAR_FILE)
 
+.PHONY: update-versions
+
+update-versions:
+	sed -i "s/^.TH NOTMUCH 1.*$$/.TH NOTMUCH 1 ${DATE} \"Notmuch ${VERSION}\"/" notmuch.1
+	sed -i "s/^__VERSION__[[:blank:]]*=.*$$/__VERSION__ = \'${VERSION}\'/" $(PV_FILE)
+
 # We invoke make recursively only to force ordering of our phony
 # targets in the case of parallel invocation of make (-j).
 #
-- 
1.7.7.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] RELEASING: document the semi-automated version propagation.
  2011-11-18  2:26 ` [PATCH 1/3] build system: use $(filter ...) to test MAKECMDGOALS David Bremner
  2011-11-18  2:26   ` [PATCH 2/3] build system: add target update-versions to propagate version David Bremner
@ 2011-11-18  2:26   ` David Bremner
  1 sibling, 0 replies; 4+ messages in thread
From: David Bremner @ 2011-11-18  2:26 UTC (permalink / raw)
  To: notmuch; +Cc: David Bremner

From: David Bremner <bremner@debian.org>

The instructions are purposely a bit coy about what files are updated,
so we don't have to update immediately when something else is plugged
into the make recipe.
---
 RELEASING |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/RELEASING b/RELEASING
index e3e0cef..88dab04 100644
--- a/RELEASING
+++ b/RELEASING
@@ -62,11 +62,11 @@ repository. From here, there are just a few steps to release:
 	be "1.0.1" and a subsequent bug-fix release would be "1.0.2"
 	etc.
 
-	Update bindings/python/notmuch/version.py to match version.
+	When you are happy with the file 'version', run
 
-	Update the version in notmuch.1 to match version.
+	     make update-versions
 
-	XXX: Probably these last two steps should be (semi-)automated.
+	to propagate the version to the other places needed.
 
 	Commit these changes.
 
-- 
1.7.7.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-11-18  2:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-06 19:58 bug: RELEASING should cover version & date in notmuch.1 Jani Nikula
2011-11-18  2:26 ` [PATCH 1/3] build system: use $(filter ...) to test MAKECMDGOALS David Bremner
2011-11-18  2:26   ` [PATCH 2/3] build system: add target update-versions to propagate version David Bremner
2011-11-18  2:26   ` [PATCH 3/3] RELEASING: document the semi-automated version propagation David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).