unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: notmuch@notmuchmail.org
Subject: [PATCH 4/4] doc: automagically read version from file
Date: Wed,  5 Mar 2014 10:56:35 -0400	[thread overview]
Message-ID: <1394031395-8014-5-git-send-email-david@tethera.net> (raw)
In-Reply-To: <1394031395-8014-1-git-send-email-david@tethera.net>

This avoids having to recreate the update-man-versions rule
---
 doc/conf.py | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/doc/conf.py b/doc/conf.py
index 6c2806d..a926fe4 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -14,10 +14,16 @@ master_doc = 'index'
 project = u'notmuch'
 copyright = u'2014, Carl Worth and many others'
 
-# The short X.Y version.
-version = '0.17'
+location = os.path.dirname(__file__)
+
+for pathdir in ['.', '..']:
+    version_file = os.path.join(location,pathdir,'version')
+    if os.path.exists(version_file):
+        with open(version_file,'r') as infile:
+            version=infile.read().replace('\n','')
+
 # The full version, including alpha/beta/rc tags.
-release = '0.17'
+release = version
 
 # List of patterns, relative to source directory, that match files and
 # directories to ignore when looking for source files.
-- 
1.8.5.3

  parent reply	other threads:[~2014-03-05 14:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-05 14:56 convert man pages to sphinx David Bremner
2014-03-05 14:56 ` [PATCH 1/4] doc: convert sphinx based docs David Bremner
2014-03-05 14:56 ` [PATCH 2/4] doc: add target rst2man to build man pages using rst2man David Bremner
2014-03-05 14:56 ` [PATCH 3/4] doc: install sphinx version of man pages David Bremner
2014-03-05 14:56 ` David Bremner [this message]
2014-03-05 18:11 ` convert man pages to sphinx Tomi Ollila
2014-03-06 13:20   ` Sphinx man pages, round n+2 David Bremner
2014-03-06 13:20     ` [PATCH v2 1/4] doc: convert sphinx based docs David Bremner
2014-03-06 13:20     ` [PATCH v2 2/4] doc: add target rst2man to build man pages using rst2man David Bremner
2014-03-06 13:20     ` [PATCH v2 3/4] doc: install sphinx version of man pages David Bremner
2014-03-06 13:20     ` [PATCH v2 4/4] doc: automagically read version from file David Bremner
2014-03-07 12:02     ` Sphinx man pages, round n+2 Tomi Ollila

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1394031395-8014-5-git-send-email-david@tethera.net \
    --to=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).