mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-31 03:07:36 +02:00
Minor fixes to documentation build scripts
This commit is contained in:
@ -94,7 +94,7 @@ def build_docs(version='dev', **kwargs):
|
|||||||
html_dir = os.path.join(work_dir, 'html')
|
html_dir = os.path.join(work_dir, 'html')
|
||||||
versions = [v for v in ['3.0.0', '2.0.0', '1.1.0'] if v != version]
|
versions = [v for v in ['3.0.0', '2.0.0', '1.1.0'] if v != version]
|
||||||
check_call(['sphinx-build',
|
check_call(['sphinx-build',
|
||||||
'-Dbreathe_projects.format=' + doxyxml_dir,
|
'-Dbreathe_projects.format=' + os.path.abspath(doxyxml_dir),
|
||||||
'-Dversion=' + version, '-Drelease=' + version,
|
'-Dversion=' + version, '-Drelease=' + version,
|
||||||
'-Aversion=' + version, '-Aversions=' + ','.join(versions),
|
'-Aversion=' + version, '-Aversions=' + ','.join(versions),
|
||||||
'-b', 'html', doc_dir, html_dir])
|
'-b', 'html', doc_dir, html_dir])
|
||||||
|
@ -34,15 +34,15 @@ fmt_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|||||||
sys.path.insert(0, os.path.join(fmt_dir, 'doc'))
|
sys.path.insert(0, os.path.join(fmt_dir, 'doc'))
|
||||||
import build
|
import build
|
||||||
|
|
||||||
work_dir = 'build'
|
build_dir = 'build'
|
||||||
|
|
||||||
# Virtualenv and repos are cached to speed up builds.
|
# Virtualenv and repos are cached to speed up builds.
|
||||||
build.create_build_env(os.path.join(work_dir, 'virtualenv'))
|
build.create_build_env(os.path.join(build_dir, 'virtualenv'))
|
||||||
|
|
||||||
fmt_repo = Git(os.path.join(work_dir, 'fmt'))
|
fmt_repo = Git(os.path.join(build_dir, 'fmt'))
|
||||||
fmt_repo.update('git@github.com:fmtlib/fmt')
|
fmt_repo.update('git@github.com:fmtlib/fmt')
|
||||||
|
|
||||||
doc_repo = Git(os.path.join(work_dir, 'fmtlib.github.io'))
|
doc_repo = Git(os.path.join(build_dir, 'fmtlib.github.io'))
|
||||||
doc_repo.update('git@github.com:fmtlib/fmtlib.github.io')
|
doc_repo.update('git@github.com:fmtlib/fmtlib.github.io')
|
||||||
|
|
||||||
for version in ['1.0.0']:#, '1.1.0', '2.0.0', '3.0.0']:
|
for version in ['1.0.0']:#, '1.1.0', '2.0.0', '3.0.0']:
|
||||||
@ -79,7 +79,7 @@ for version in ['1.0.0']:#, '1.1.0', '2.0.0', '3.0.0']:
|
|||||||
f.write(data)
|
f.write(data)
|
||||||
# Build the docs.
|
# Build the docs.
|
||||||
html_dir = build.build_docs(version, doc_dir=target_doc_dir,
|
html_dir = build.build_docs(version, doc_dir=target_doc_dir,
|
||||||
include_dir=fmt_repo.dir, work_dir=work_dir)
|
include_dir=fmt_repo.dir, work_dir=build_dir)
|
||||||
# Create symlinks for older versions.
|
# Create symlinks for older versions.
|
||||||
for link, target in {'index': 'contents', 'api': 'reference'}.items():
|
for link, target in {'index': 'contents', 'api': 'reference'}.items():
|
||||||
os.symlink(target + '.html', os.path.join(html_dir, link) + '.html')
|
os.symlink(target + '.html', os.path.join(html_dir, link) + '.html')
|
||||||
|
Reference in New Issue
Block a user