Skip to content

Commit

Permalink
Merge "Pick up version to be included in documentation from right pat…
Browse files Browse the repository at this point in the history
…h. Also bundle it so it can be accessed at <ip>:8082/documentation/_static/contrail_openapi.json" into R3.2
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Nov 11, 2016
2 parents be19a0e + 1da5483 commit 2e12c0c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/config/api-server/doc/SConscript
Expand Up @@ -20,10 +20,12 @@ if os.path.exists('/usr/bin/sphinx-apidoc'):
userdoc_rule = env.Install(Dir('.'), Glob('#controller/src/config/api-server/doc/source/*'))
schema_rule = env.Install(Dir('.'), Glob('#controller/src/schema/*.xsd'))
gendoc_rule = env.Install(Dir('.'), env['TOP'] + '/config/api-server/vnc_cfg_api_server/gen/contrail_openapi.rst')
openapi_rule = env.Install(Dir('.'), env['TOP'] + '/config/api-server/vnc_cfg_api_server/gen/contrail_openapi.json')

html_gen_rule = env.Command('contrail-config', ['Makefile', 'conf.py'],
'make -C ' + Dir('.').path + ' html')
env.Depends(html_gen_rule, [apidoc_rule, gendoc_rule, userdoc_rule, schema_rule])
env.Depends(html_gen_rule,
[apidoc_rule, gendoc_rule, userdoc_rule, schema_rule, openapi_rule])


doc_sources_rules.append(env.Install("../vnc_cfg_api_server", Dir('.')))
Expand Down
6 changes: 3 additions & 3 deletions src/config/api-server/doc/source/conf.py
Expand Up @@ -55,8 +55,8 @@
# The short X.Y version.
data = '0.99'
try:
with open ("../../../../../src/base/version.info", "r") as myfile:
data=myfile.read().replace('\n', '')
with open("../../../../../controller/src/base/version.info", "r") as f:
data=f.read().replace('\n', '')
except:
pass

Expand Down Expand Up @@ -132,7 +132,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 = ['_static']
html_static_path = ['_static', 'contrail_openapi.json']

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
Expand Down

0 comments on commit 2e12c0c

Please sign in to comment.