Skip to content

Commit

Permalink
Conditional fixes for the documentation message box
Browse files Browse the repository at this point in the history
  • Loading branch information
natefoo committed Jan 18, 2018
1 parent 98e369c commit 4bdebe0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions doc/source/conf.versioning.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
MIN_DOC_VERSION = LooseVersion('17.05')

# Enable simpleversioning
if GIT_BRANCH:
extensions += ['sphinxcontrib.simpleversioning']
extensions += ['sphinxcontrib.simpleversioning']

# -- sphinxcontrib-simpleversioning Settings ---------------------------------

Expand Down Expand Up @@ -56,9 +55,11 @@
{'id': 'latest', 'name': 'dev'},
)

if TARGET_GIT_BRANCH.startswith('release_') and not TARGET_GIT_BRANCH == 'release_%s' % _stable:
simpleversioning_show_banner = True
simpleversioning_banner_message = OLD_BANNER
if TARGET_GIT_BRANCH.startswith('release_'):
# The current stable release will go here but fail the next conditional, avoiding either banner.
if TARGET_GIT_BRANCH != 'release_%s' % _stable:
simpleversioning_show_banner = True
simpleversioning_banner_message = OLD_BANNER
elif TARGET_GIT_BRANCH != 'master':
simpleversioning_show_banner = True
simpleversioning_banner_message = DEV_BANNER

0 comments on commit 4bdebe0

Please sign in to comment.