[DOCs][RTD] Trying to generate dev/master docs

This commit is contained in:
Salvador E. Tropea 2023-08-29 10:22:33 -03:00
parent dec9c9e07a
commit 73bf7b16e9
1 changed files with 3 additions and 0 deletions

View File

@ -72,6 +72,9 @@ html_show_sourcelink = False
import subprocess
branch = subprocess.check_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD']).decode().strip()
if branch == 'HEAD':
ver = os.environ.get('READTHEDOCS_VERSION', 'latest')
branch = 'dev' if ver == 'latest' else 'master'
if branch != "master":
doc_id = ("**This is the documentation for the current development KiBot, not yet released. "