release.py: build HTML docs when cutting releases
authorW. Trevor King <wking@tremily.us>
Mon, 12 Nov 2012 16:54:47 +0000 (11:54 -0500)
committerW. Trevor King <wking@tremily.us>
Mon, 12 Nov 2012 16:59:29 +0000 (11:59 -0500)
release.py

index 1dee068edac95cc00cc4e8b2132a52240563c526..c248eda2b07a5d477bc69ec2701e7fa47eb10c1a 100755 (executable)
@@ -130,6 +130,12 @@ def make_id_cache():
     """
     invoke([sys.executable, './be', 'list'])
 
+def make_html_docs(docdir):
+    """Generate docs so users won't need to install Sphinx, etc.
+    """
+    print('generate HTML docs in {}'.format(docdir))
+    status,stdout,stderr = invoke(['make', 'dirhtml'], cwd=docdir)
+
 def create_tarball(tag):
     release_name='be-%s' % tag
     export_dir = release_name
@@ -142,6 +148,7 @@ def create_tarball(tag):
                 os.path.join(export_dir, 'libbe', '_version.py'))
     make_changelog(os.path.join(export_dir, 'ChangeLog'), tag)
     make_id_cache()
+    make_html_docs(os.path.join(export_dir, 'doc'))
     print 'copy .be/id-cache to %s/.be/id-cache' % export_dir
     shutil.copy(os.path.join('.be', 'id-cache'),
                 os.path.join(export_dir, '.be', 'id-cache'))