Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/build-book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch_depth: 0
fetch-depth: 0

- name: Restore mtimes from git history
run: |
Expand Down
15 changes: 8 additions & 7 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,18 @@
else:
build_languages = ["en"] + languages

# Get the latest Git tag - there might be a prettier way to do this but...
# Use only the Git SHA for the Sphinx "release" string.
# (Sphinx doesn't require PEP 440 here, but we keep it well-formed and stable.)
try:
release_value = (
subprocess.check_output(["git", "describe", "--tags"])
subprocess.check_output(["git", "rev-parse", "--short=12", "HEAD"])
.decode("utf-8")
.strip()
)
release_value = release_value[:4]
except subprocess.CalledProcessError:
release_value = "0.1" # Default value in case there's no tag
except (subprocess.CalledProcessError, FileNotFoundError, ValueError):
# Fallback when building from a source archive or without git available
release_value = "unknown"

# Update the release value
release = release_value

# -- General configuration ---------------------------------------------------
Expand Down Expand Up @@ -181,7 +181,8 @@
".venv",
"venv",
"env",
"LICENSE.rst"
"LICENSE.rst",
"SECURITY.md"
]

# For sitemap generation
Expand Down
Loading