Skip to content

Commit 38afc2a

Browse files
committed
fix(docs): update documentation build script to reflect current versioning logic
1 parent e88cfb4 commit 38afc2a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.readthedocs.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,17 @@ build:
1111
python: "3.13"
1212
jobs:
1313
post_checkout:
14-
# Copy the appropriate conf.py based on project name
14+
# Copy the appropriate conf.py based on git branch/tag
1515
- |
16-
if [ "$DOC_BUILD_VERSION" = "v2" ]; then
17-
echo "DOC_BUILD_VERSION is: $DOC_BUILD_VERSION"
16+
CURRENT_VERSION="${READTHEDOCS_VERSION_NAME}"
17+
echo "Building documentation for version: $CURRENT_VERSION"
18+
19+
# Check if this is a v2 version (branch/tag starts with v2 or contains version2)
20+
if [[ "$CURRENT_VERSION" == v2* ]] || [[ "$CURRENT_VERSION" == *version2* ]]; then
1821
echo "Building brainpy-version2 documentation"
1922
mkdir -p docs_build
2023
cp -r docs_version2/* docs_build/
2124
else
22-
echo "DOC_BUILD_VERSION is: $DOC_BUILD_VERSION"
2325
echo "Building standard brainpy documentation"
2426
mkdir -p docs_build
2527
cp -r docs/* docs_build/

0 commit comments

Comments
 (0)