[Bf-blender-cvs] [29859d0d5e] master: Fix some more minor issue with updated py doc generation.

Bastien Montagne noreply at git.blender.org
Thu Feb 23 22:31:47 CET 2017


Commit: 29859d0d5e6c0365fc86570fc235120314c6a9a4
Author: Bastien Montagne
Date:   Thu Feb 23 22:31:21 2017 +0100
Branches: master
https://developer.blender.org/rB29859d0d5e6c0365fc86570fc235120314c6a9a4

Fix some more minor issue with updated py doc generation.

===================================================================

M	doc/python_api/sphinx_doc_update.py

===================================================================

diff --git a/doc/python_api/sphinx_doc_update.py b/doc/python_api/sphinx_doc_update.py
index 884ddeecff..561e58dec6 100755
--- a/doc/python_api/sphinx_doc_update.py
+++ b/doc/python_api/sphinx_doc_update.py
@@ -98,6 +98,7 @@ def main():
 
     blenver = blenver_zip = ""
     api_name = ""
+    branch = ""
     is_release = False
 
     # I) Update local mirror using rsync.
@@ -119,6 +120,7 @@ def main():
             "    is_release = bpy.app.version_cycle in {'rc', 'release'}\n"
             "    branch = bpy.app.build_branch.split()[0].decode()\n"
             "    f.write('%d\\n' % is_release)\n"
+            "    f.write('%s\\n' % branch)\n"
             "    f.write('%d.%d%s\\n' % (bpy.app.version[0], bpy.app.version[1], bpy.app.version_char)\n"
             "            if is_release else '%s\\n' % branch)\n"
             "    f.write('%d_%d%s_release' % (bpy.app.version[0], bpy.app.version[1], bpy.app.version_char)\n"
@@ -127,7 +129,7 @@ def main():
                        "--python-expr", getver_script, "--", getver_file)
         subprocess.run(get_ver_cmd)
         with open(getver_file) as f:
-            is_release, blenver, blenver_zip = f.read().split("\n")
+            is_release, branch, blenver, blenver_zip = f.read().split("\n")
             is_release = bool(int(is_release))
         os.remove(getver_file)
 
@@ -166,7 +168,7 @@ def main():
         with open(os.path.join(args.mirror_dir, "250PythonDoc/index.html"), 'w') as f:
             f.write("<html><head><title>Redirecting...</title><meta http-equiv=\"REFRESH\""
                     "content=\"0;url=../%s/\"></head><body>Redirecting...</body></html>" % api_name)
-    else:
+    elif branch == "master":
         with open(os.path.join(args.mirror_dir, "blender_python_api/index.html"), 'w') as f:
             f.write("<html><head><title>Redirecting...</title><meta http-equiv=\"REFRESH\""
                     "content=\"0;url=../%s/\"></head><body>Redirecting...</body></html>" % api_name)




More information about the Bf-blender-cvs mailing list