From 2b781fd88c8f0049df07984629d830326599a609 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Fri, 7 Mar 2014 09:20:48 +2000 Subject: [PATCH] [PATCH v2 4/4] doc: automagically read version from file --- 88/77f9305c778d857b4aeba4c46c56117b55b505 | 81 +++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 88/77f9305c778d857b4aeba4c46c56117b55b505 diff --git a/88/77f9305c778d857b4aeba4c46c56117b55b505 b/88/77f9305c778d857b4aeba4c46c56117b55b505 new file mode 100644 index 000000000..8d580bf8c --- /dev/null +++ b/88/77f9305c778d857b4aeba4c46c56117b55b505 @@ -0,0 +1,81 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 23074431FC0 + for ; Thu, 6 Mar 2014 05:21:15 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id bO26UTHY-9Bg for ; + Thu, 6 Mar 2014 05:21:11 -0800 (PST) +Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) + (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 5F798431FC2 + for ; Thu, 6 Mar 2014 05:21:11 -0800 (PST) +Received: from remotemail by yantan.tethera.net with local (Exim 4.80) + (envelope-from ) + id 1WLYEZ-0000vl-26; Thu, 06 Mar 2014 09:21:11 -0400 +Received: (nullmailer pid 2402 invoked by uid 1000); Thu, 06 Mar 2014 + 13:20:57 -0000 +From: David Bremner +To: notmuch@notmuchmail.org +Subject: [PATCH v2 4/4] doc: automagically read version from file +Date: Thu, 6 Mar 2014 09:20:48 -0400 +Message-Id: <1394112048-2151-5-git-send-email-david@tethera.net> +X-Mailer: git-send-email 1.8.5.3 +In-Reply-To: <1394112048-2151-1-git-send-email-david@tethera.net> +References: + <1394112048-2151-1-git-send-email-david@tethera.net> +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Thu, 06 Mar 2014 13:21:15 -0000 + +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 + -- 2.26.2