Skip to content
Open
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
7 changes: 7 additions & 0 deletions cuda_bindings_13/docs/build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ cp source/_templates/main.html build/html/index.html

# ensure that the latest docs is the one we built
if [[ $LATEST_ONLY == "0" ]]; then
# Refuse to publish a versioned subdir for pre-release or local
# versions, which otherwise leak orphan trees onto gh-pages that
# are not reachable via nv-versions.json. See #3231.
if [[ "${SPHINX_CUDA_BINDINGS_VER}" == *.dev* || "${SPHINX_CUDA_BINDINGS_VER}" == *+* ]]; then
echo "refusing to publish versioned docs for pre-release version '${SPHINX_CUDA_BINDINGS_VER}'" >&2

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Functional Correctness · Quick win

minor: Use an error message that matches the guard. The branch rejects .dev and +, but the message says “pre-release version.” The guard allows alpha, beta, and release-candidate versions. Use wording such as “development or local version” in all three scripts.

exit 1
fi
cp -r build/html/${SPHINX_CUDA_BINDINGS_VER} build/html/latest
else
mv build/html/${SPHINX_CUDA_BINDINGS_VER} build/html/latest
Expand Down
7 changes: 7 additions & 0 deletions cuda_core/docs/build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ cp source/_templates/main.html build/html/index.html

# ensure that the latest docs is the one we built
if [[ $LATEST_ONLY == "0" ]]; then
# Refuse to publish a versioned subdir for pre-release or local
# versions, which otherwise leak orphan trees onto gh-pages that
# are not reachable via nv-versions.json. See #3231.
if [[ "${SPHINX_CUDA_CORE_VER}" == *.dev* || "${SPHINX_CUDA_CORE_VER}" == *+* ]]; then
echo "refusing to publish versioned docs for pre-release version '${SPHINX_CUDA_CORE_VER}'" >&2
exit 1
fi
cp -r build/html/${SPHINX_CUDA_CORE_VER} build/html/latest
else
mv build/html/${SPHINX_CUDA_CORE_VER} build/html/latest
Expand Down
7 changes: 7 additions & 0 deletions cuda_pathfinder/docs/build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ cp source/_templates/main.html build/html/index.html

# ensure that the latest docs is the one we built
if [[ $LATEST_ONLY == "0" ]]; then
# Refuse to publish a versioned subdir for pre-release or local
# versions, which otherwise leak orphan trees onto gh-pages that
# are not reachable via nv-versions.json. See #3231.
if [[ "${SPHINX_CUDA_PATHFINDER_VER}" == *.dev* || "${SPHINX_CUDA_PATHFINDER_VER}" == *+* ]]; then
echo "refusing to publish versioned docs for pre-release version '${SPHINX_CUDA_PATHFINDER_VER}'" >&2
exit 1
fi
cp -r build/html/${SPHINX_CUDA_PATHFINDER_VER} build/html/latest
else
mv build/html/${SPHINX_CUDA_PATHFINDER_VER} build/html/latest
Expand Down
Loading