Skip to content

Commit

Permalink
Merge pull request #4372 from YosysHQ/krys/docs_version_number
Browse files Browse the repository at this point in the history
Docs: Set release to YOSYS_VER
  • Loading branch information
mmicko authored May 7, 2024
2 parents 68c7fc4 + 6eb49ee commit 90dd508
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@
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')
Expand Down

0 comments on commit 90dd508

Please sign in to comment.