Skip to content

Commit

Permalink
Instead of hardcoding the version number here, we read it from the pr…
Browse files Browse the repository at this point in the history
…oject's configure script
  • Loading branch information
philshafer committed Oct 29, 2019
1 parent 7ee7bbc commit 02c7232
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@
# import sys
# sys.path.insert(0, os.path.abspath('.'))

import subprocess

#
# Instead of hardcoding the version number here, we read it from the
# project's configure script
#
vers_cmd = "grep AC_INIT ../configure.ac | awk '{ print substr($2, 2, length($2) - 3);}'"
version = subprocess.check_output(vers_cmd, shell=True).decode("utf-8")

# -- General configuration ------------------------------------------------

Expand Down Expand Up @@ -58,9 +66,9 @@
# built documents.
#
# The short X.Y version.
version = 'develop'
#version = 'develop'
# The full version, including alpha/beta/rc tags.
release = 'develop'
release = version

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -100,7 +108,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['../../doc/_static']
html_static_path = ['_static']

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
Expand Down

0 comments on commit 02c7232

Please sign in to comment.