From 7724c4dccb18ed9e48b050713540a2d05eacd2a1 Mon Sep 17 00:00:00 2001 From: patrick96 Date: Fri, 17 May 2019 09:35:48 +0200 Subject: [PATCH] rtd: Use provided version string on rtd @APP_VERSION@ isn't available on rtd because it doesn't configure the entire project --- doc/conf.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index e046f33c..7041c9d0 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -26,14 +26,19 @@ copyright = '2016-{}, Michael Carlberg & contributors'.format( ) author = 'Polybar Team' -# The short X.Y version -version = '@APP_VERSION@' -# The full version, including alpha/beta/rc tags -release = version - # is whether we are on readthedocs.io on_rtd = os.environ.get('READTHEDOCS', None) == 'True' +if on_rtd: + # On readthedocs, cmake isn't run so the version string isn't available + version = os.environ.get('READTHEDOCS_VERSION', None) +else: + # The short X.Y version + version = '@APP_VERSION@' + +# The full version, including alpha/beta/rc tags +release = version + # Set path to documentation if on_rtd: # On readthedocs conf.py is already in the doc folder