mirror of
https://github.com/ceph/ceph
synced 2024-12-27 14:03:25 +00:00
doc/conf: read version and release from src/ceph_release
instead of hardwiring them to 'dev' and 'dev', use the src/ceph_release as the source of truth. Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
parent
be26c566e5
commit
beb218c41d
25
doc/conf.py
25
doc/conf.py
@ -7,13 +7,28 @@ import sys
|
||||
|
||||
import yaml
|
||||
|
||||
|
||||
top_level = \
|
||||
os.path.dirname(
|
||||
os.path.dirname(
|
||||
os.path.abspath(__file__)))
|
||||
|
||||
|
||||
def parse_ceph_release():
|
||||
with open(os.path.join(top_level, 'src/ceph_release')) as f:
|
||||
lines = f.readlines()
|
||||
assert(len(lines) == 3)
|
||||
# 16, pacific, dev
|
||||
version, codename, status = [line.strip() for line in lines]
|
||||
return version, codename, status
|
||||
|
||||
|
||||
# project information
|
||||
project = 'Ceph'
|
||||
copyright = ('2016, Ceph authors and contributors. '
|
||||
'Licensed under Creative Commons Attribution Share Alike 3.0 '
|
||||
'(CC-BY-SA-3.0)')
|
||||
version = 'dev'
|
||||
release = 'dev'
|
||||
version, codename, release = parse_ceph_release()
|
||||
pygments_style = 'sphinx'
|
||||
|
||||
# HTML output options
|
||||
@ -104,12 +119,6 @@ rst_prolog = """
|
||||
.. |stable-release| replace:: octopus
|
||||
"""
|
||||
|
||||
top_level = os.path.dirname(
|
||||
os.path.dirname(
|
||||
os.path.abspath(__file__)
|
||||
)
|
||||
)
|
||||
|
||||
# breath options
|
||||
breathe_default_project = "Ceph"
|
||||
# see $(top_srcdir)/Doxyfile
|
||||
|
Loading…
Reference in New Issue
Block a user