From c54922899a4a3984af9f49b902bc09a806f33cc3 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Thu, 6 Mar 2014 10:56:35 +2000 Subject: [PATCH] [PATCH 4/4] doc: automagically read version from file --- 11/adce886b7e0804ccb86a7ec9d4332827abce9c | 80 +++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 11/adce886b7e0804ccb86a7ec9d4332827abce9c diff --git a/11/adce886b7e0804ccb86a7ec9d4332827abce9c b/11/adce886b7e0804ccb86a7ec9d4332827abce9c new file mode 100644 index 000000000..ebe5615f0 --- /dev/null +++ b/11/adce886b7e0804ccb86a7ec9d4332827abce9c @@ -0,0 +1,80 @@ +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 ED560431FD4 + for ; Wed, 5 Mar 2014 06:56:52 -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 ZWUuVHErZ-Wt for ; + Wed, 5 Mar 2014 06:56:47 -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 664F6431FBF + for ; Wed, 5 Mar 2014 06:56:47 -0800 (PST) +Received: from remotemail by yantan.tethera.net with local (Exim 4.80) + (envelope-from ) + id 1WLDFX-00049a-1d; Wed, 05 Mar 2014 10:56:47 -0400 +Received: (nullmailer pid 10387 invoked by uid 1000); Wed, 05 Mar 2014 + 14:56:37 -0000 +From: David Bremner +To: notmuch@notmuchmail.org +Subject: [PATCH 4/4] doc: automagically read version from file +Date: Wed, 5 Mar 2014 10:56:35 -0400 +Message-Id: <1394031395-8014-5-git-send-email-david@tethera.net> +X-Mailer: git-send-email 1.8.5.3 +In-Reply-To: <1394031395-8014-1-git-send-email-david@tethera.net> +References: <1394031395-8014-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: Wed, 05 Mar 2014 14:56:53 -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