From 29859d0d5e6c0365fc86570fc235120314c6a9a4 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 23 Feb 2017 22:31:21 +0100 Subject: Fix some more minor issue with updated py doc generation. --- doc/python_api/sphinx_doc_update.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/python_api/sphinx_doc_update.py b/doc/python_api/sphinx_doc_update.py index 884ddeecffb..561e58dec66 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("Redirecting...Redirecting..." % api_name) - else: + elif branch == "master": with open(os.path.join(args.mirror_dir, "blender_python_api/index.html"), 'w') as f: f.write("Redirecting...Redirecting..." % api_name) -- cgit v1.2.3