Skip to content

Commit f62d069

Browse files
committed
get rid of version tags after the patch number
1 parent bde6760 commit f62d069

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

cuda_bindings/docs/build_docs.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
set -ex
44

55
# SPHINX_CUDA_BINDINGS_VER is used to create a subdir under build/html
6-
# (the Makefile file for sphinx-build also honors it if defined)
6+
# (the Makefile file for sphinx-build also honors it if defined).
7+
# If there's a post release (ex: .post1) we don't want it to show up in the
8+
# version selector or directory structure.
79
if [[ -z "${SPHINX_CUDA_BINDINGS_VER}" ]]; then
8-
export SPHINX_CUDA_BINDINGS_VER=$(python -c "from importlib.metadata import version; print(version('cuda-python'))" \
10+
export SPHINX_CUDA_BINDINGS_VER=$(python -c "from importlib.metadata import version; \
11+
ver = '.'.join(str(version('cuda-python')).split('.')[:3]); \
12+
print(ver)" \
913
| awk -F'+' '{print $1}')
1014
fi
1115

cuda_python/docs/build_docs.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@
33
set -ex
44

55
# SPHINX_CUDA_PYTHON_VER is used to create a subdir under build/html
6-
# (the Makefile file for sphinx-build also honors it if defined)
6+
# (the Makefile file for sphinx-build also honors it if defined).
7+
# If there's a post release (ex: .post1) we don't want it to show up in the
8+
# version selector or directory structure.
79
if [[ -z "${SPHINX_CUDA_PYTHON_VER}" ]]; then
8-
export SPHINX_CUDA_PYTHON_VER=$(python -c "from importlib.metadata import version; print(version('cuda-python'))" \
10+
export SPHINX_CUDA_PYTHON_VER=$(python -c "from importlib.metadata import version; \
11+
ver = '.'.join(str(version('cuda-python')).split('.')[:3]); \
12+
print(ver)" \
913
| awk -F'+' '{print $1}')
1014
fi
1115

0 commit comments

Comments
 (0)