Skip to content

Commit ab77e16

Browse files
committed
fix(docs): enhance version check in documentation build script to include 'latest' version
1 parent 9fa7a6e commit ab77e16

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.readthedocs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ build:
1616
CURRENT_VERSION="${READTHEDOCS_VERSION_NAME}"
1717
echo "Building documentation for version: $CURRENT_VERSION"
1818
19-
# Check if this is a v2 version (branch/tag starts with v2 or contains version2)
20-
if [[ "$CURRENT_VERSION" == stable* ]] || [[ "$CURRENT_VERSION" == v2* ]] || [[ "$CURRENT_VERSION" == *version2* ]]; then
19+
# Check if this is a v2 version (latest, stable, or tags starting with v2)
20+
if [[ "$CURRENT_VERSION" == "latest" ]] || [[ "$CURRENT_VERSION" == stable* ]] || [[ "$CURRENT_VERSION" == v2* ]] || [[ "$CURRENT_VERSION" == *version2* ]]; then
2121
echo "Building brainpy-version2 documentation"
2222
mkdir -p docs_build
2323
cp -r docs_version2/* docs_build/
@@ -29,7 +29,7 @@ build:
2929
3030
# Build documentation using the copied conf.py
3131
sphinx:
32-
configuration: docs_build/conf.py
32+
configuration: docs_version2/conf.py
3333

3434
# Optionally set the version of Python and requirements required to build your docs
3535
python:

0 commit comments

Comments
 (0)