mirror of https://github.com/YosysHQ/yosys.git
Docs: Set release to YOSYS_VER
If building from read the docs, and the current build is "latest", add `-dev` to the version string. Requires `YOSYS_VER` to be exported by .readthedocs.yaml.
This commit is contained in:
parent
0f9ee20ea2
commit
bb0be8c7a2
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue