diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2017-02-24 00:31:21 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2017-02-24 00:31:21 +0300 |
commit | 29859d0d5e6c0365fc86570fc235120314c6a9a4 (patch) | |
tree | 49e6a7e38b410eb6f275e49aad023251885fcb8a /doc/python_api/sphinx_doc_update.py | |
parent | c067f1d0d470ada577f2b722b543d814448ce550 (diff) |
Fix some more minor issue with updated py doc generation.
Diffstat (limited to 'doc/python_api/sphinx_doc_update.py')
-rwxr-xr-x | doc/python_api/sphinx_doc_update.py | 6 |
1 files changed, 4 insertions, 2 deletions
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("<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) |