Merge pull request #4372 from YosysHQ/krys/docs_version_number

Docs: Set release to YOSYS_VER
This commit is contained in:
Miodrag Milanović 2024-05-07 09:15:51 +02:00 committed by GitHub
commit 90dd508156
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View File

@ -1012,7 +1012,7 @@ docs/reqs:
DOC_TARGET ?= html
docs: docs/source/cmd/abc.rst docs/gen_examples docs/gen_images docs/guidelines docs/usage docs/reqs
$(Q) $(MAKE) -C docs $(DOC_TARGET)
$(Q) YOSYS_VER=$(YOSYS_VER) $(MAKE) -C docs $(DOC_TARGET)
clean:
rm -rf share

View File

@ -63,6 +63,14 @@ latex_elements = {
extensions.append('sphinx.ext.todo')
todo_include_todos = False
# attempt to get version
env_yosys_ver = os.getenv("YOSYS_VER")
if env_yosys_ver:
if os.getenv("READTHEDOCS") and os.getenv("READTHEDOCS_VERSION") == "latest":
release = env_yosys_ver + "-dev"
else:
release = env_yosys_ver
# custom cmd-ref parsing/linking
sys.path += [os.path.dirname(__file__) + "/../"]
extensions.append('util.cmdref')