[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54691] trunk/blender/doc/python_api: edits to document uploading script so the latest release docs can always be found at :

Campbell Barton ideasman42 at gmail.com
Wed Feb 20 15:22:37 CET 2013


Revision: 54691
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54691
Author:   campbellbarton
Date:     2013-02-20 14:22:36 +0000 (Wed, 20 Feb 2013)
Log Message:
-----------
edits to document uploading script so the latest release docs can always be found at:
http://www.blender.org/documentation/blender_python_api

Easier for linking wiki docs.

Modified Paths:
--------------
    trunk/blender/doc/python_api/sphinx_doc_gen.py
    trunk/blender/doc/python_api/sphinx_doc_gen.sh

Modified: trunk/blender/doc/python_api/sphinx_doc_gen.py
===================================================================
--- trunk/blender/doc/python_api/sphinx_doc_gen.py	2013-02-20 13:41:29 UTC (rev 54690)
+++ trunk/blender/doc/python_api/sphinx_doc_gen.py	2013-02-20 14:22:36 UTC (rev 54691)
@@ -1483,7 +1483,9 @@
 
 def execfile(filepath):
     global_namespace = {"__file__": filepath, "__name__": "__main__"}
-    exec(compile(open(filepath).read(), filepath, 'exec'), global_namespace)
+    file_handle = open(filepath)
+    exec(compile(file_handle.read(), filepath, 'exec'), global_namespace)
+    file_handle.close()
 
 
 def write_rst_contents(basepath):

Modified: trunk/blender/doc/python_api/sphinx_doc_gen.sh
===================================================================
--- trunk/blender/doc/python_api/sphinx_doc_gen.sh	2013-02-20 13:41:29 UTC (rev 54690)
+++ trunk/blender/doc/python_api/sphinx_doc_gen.sh	2013-02-20 14:22:36 UTC (rev 54691)
@@ -32,8 +32,7 @@
 blender_version_cycle=$(grep BLENDER_VERSION_CYCLE $blender_srcdir/source/blender/blenkernel/BKE_blender.h | awk '{print $3}')
 blender_subversion=$(grep BLENDER_SUBVERSION $blender_srcdir/source/blender/blenkernel/BKE_blender.h | awk '{print $3}')
 
-if [ "$blender_version_cycle" == "release" ]
-then
+if [ "$blender_version_cycle" == "release" ] ; then
 	BLENDER_VERSION=$(expr $blender_version / 100)_$(expr $blender_version % 100)$blender_version_char"_release"
 else
 	BLENDER_VERSION=$(expr $blender_version / 100)_$(expr $blender_version % 100)_$blender_subversion
@@ -109,6 +108,11 @@
 	# better redirect
 	ssh $SSH_USER at emo.blender.org 'echo "<html><head><title>Redirecting...</title><meta http-equiv=\"REFRESH\" content=\"0;url=../blender_python_api_'$BLENDER_VERSION'/\"></head><body>Redirecting...</body></html>" > '$SSH_UPLOAD'/250PythonDoc/index.html'
 
+	# redirect for release only so wiki can point here
+	if [ "$blender_version_cycle" == "release" ] ; then
+		ssh $SSH_USER at emo.blender.org 'echo "<html><head><title>Redirecting...</title><meta http-equiv=\"REFRESH\" content=\"0;url=../blender_python_api_'$BLENDER_VERSION'/\"></head><body>Redirecting...</body></html>" > '$SSH_UPLOAD'/blender_python_api/index.html'
+	fi
+
 	if $DO_OUT_PDF ; then
 		# rename so local PDF has matching name.
 		rsync --progress -avze "ssh -p 22" $SPHINXBASE/sphinx-out/blender_python_reference_$BLENDER_VERSION.pdf $SSH_HOST:$SSH_UPLOAD_FULL/blender_python_reference_$BLENDER_VERSION.pdf




More information about the Bf-blender-cvs mailing list