mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: barebox@lists.infradead.org
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>
Subject: [PATCH] Documentation: Provide default values for version/release
Date: Sat,  7 Sep 2019 17:04:32 -0700	[thread overview]
Message-ID: <20190908000432.27779-1-andrew.smirnov@gmail.com> (raw)

Provide default values for version/release so it would be possible to
run Sphinx outside of the build system. Useful for rst-sphinx backend
of flycheck in Emacs, for example.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
 Documentation/conf.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/conf.py b/Documentation/conf.py
index ec6ec0470b..bcd8633c91 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -53,9 +53,9 @@ copyright = u'2014, The barebox project'
 # The short X.Y version.
 import os
 
-version = os.environ["KERNELVERSION"]
+version = os.environ.get("KERNELVERSION", 'unknown version')
 # The full version, including alpha/beta/rc tags.
-release = os.environ["KERNELRELEASE"]
+release = os.environ.get("KERNELRELEASE", 'unknown release')
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
-- 
2.21.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2019-09-08  0:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-08  0:04 Andrey Smirnov [this message]
2019-09-09  8:49 ` Sascha Hauer

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

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

  git send-email \
    --in-reply-to=20190908000432.27779-1-andrew.smirnov@gmail.com \
    --to=andrew.smirnov@gmail.com \
    --cc=barebox@lists.infradead.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox