Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,18 @@
# Retrieve the version number from the package
try:
release = setuptools_scm.get_version(root="../..", relative_to=__file__)
release = release.split("+")[0] # remove git hash but retain .dev tag if present
release = release.split("+")[0] # remove git hash
except LookupError:
# if git is not initialised, still allow local build
# with a dummy version
release = "0.0.0"

# Release labels for the version switcher dropdown
if "dev" in release:
doc_version = "dev"
else:
doc_version = f"v{release}"


# -- General configuration ---------------------------------------------------

Expand Down Expand Up @@ -130,7 +136,7 @@
],
"switcher": {
"json_url": "https://neuroblueprint.neuroinformatics.dev/latest/_static/switcher.json",
"version_match": release,
"version_match": doc_version,
},
"logo": {
"text": f"NeuroBlueprint v{release}",
Expand Down