Skip to content

Commit

Permalink
add version number in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
samjwu committed Mar 17, 2023
1 parent 4739d79 commit 30ae6c3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,15 @@
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

import subprocess
from rocm_docs import ROCmDocs

docs_core = ROCmDocs("hipBLAS Documentation")
getVersionCmd = r'sed -n -e "s/^.*VERSION_STRING.* \"\([0-9\.]\{1,\}\).*/\1/p" ../CMakeLists.txt'
version = subprocess.getoutput(getVersionCmd)
if len(version) == 0:
version = '1.0.0' # optional version number override if CMakeLists.txt does not have the version

docs_core = ROCmDocs("hipBLAS {}".format(version))
docs_core.run_doxygen()
docs_core.setup()

Expand Down

0 comments on commit 30ae6c3

Please sign in to comment.