You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by am...@apache.org on 2018/08/30 20:04:33 UTC

[trafficserver] branch master updated: Allows to run Spinx builds on portions of the docs

This is an automated email from the ASF dual-hosted git repository.

amc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 3a292d6  Allows to run Spinx builds on portions of the docs
3a292d6 is described below

commit 3a292d699c899e8d43b993f891f5f1addbacdd57
Author: Leif Hedstrom <zw...@apache.org>
AuthorDate: Tue Aug 14 22:03:36 2018 -0700

    Allows to run Spinx builds on portions of the docs
    
    This turns out to be useful, for example in Visual Code, we can
    now render the Restructured Text inline in the editor, which is
    nice when you are editing the docs files.
    
    This change essentially allows us to run the Sphinx command on a
    single file, without having to "make" the entire Docs tree.
---
 .gitignore                 |  1 +
 doc/ext/local-config.py.in | 13 +++++++++++--
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index c487305..6651555 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,6 +26,7 @@ Makefile.in
 /build-aux
 /configure
 /tags
+/_build
 
 build/_aux/
 build/libtool.m4
diff --git a/doc/ext/local-config.py.in b/doc/ext/local-config.py.in
index cefb5df..d6c47ce 100644
--- a/doc/ext/local-config.py.in
+++ b/doc/ext/local-config.py.in
@@ -14,5 +14,14 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-plantuml='@JAVA@ -jar {}'.format(os.environ['PLANTUML_JAR'])
-plantuml_output_format='svg'
+import os
+import subprocess
+
+if "PLANTUML_JAR" in os.environ:
+    _plantuml_jar = os.environ["PLANTUML_JAR"]
+else:
+    _plantuml_jar = subprocess.check_output("./doc/plantuml_fetch.sh| tail -1",
+                                            shell=True, universal_newlines=True)
+
+plantuml = '@JAVA@ -jar {}'.format(_plantuml_jar.rstrip('\n'))
+plantuml_output_format = 'svg'