[Bf-blender-cvs] [56c798e] master: API doc update script: Fix generated zipfile name, was broken in 'release' case...
Bastien Montagne
noreply at git.blender.org
Tue Sep 13 08:39:08 CEST 2016
Commit: 56c798ee620719750dd38917cb8ce191e02913ad
Author: Bastien Montagne
Date: Tue Sep 13 08:38:10 2016 +0200
Branches: master
https://developer.blender.org/rB56c798ee620719750dd38917cb8ce191e02913ad
API doc update script: Fix generated zipfile name, was broken in 'release' case...
===================================================================
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 c93f167..5301f39 100755
--- a/doc/python_api/sphinx_doc_update.py
+++ b/doc/python_api/sphinx_doc_update.py
@@ -108,18 +108,19 @@ def main():
subprocess.run(doc_gen_cmd)
# III) Get Blender version info.
- blenver = ""
+ blenver = blenver_zip = ""
getver_file = os.path.join(tmp_dir, "blendver.txt")
getver_script = (""
"import sys, bpy\n"
"with open(sys.argv[-1], 'w') as f:\n"
- " f.write('%d_%d%s_release' % (bpy.app.version[0], bpy.app.version[1], bpy.app.version_char)\n"
- " if bpy.app.version_cycle in {'rc', 'release'} else '%d_%d_%d' % bpy.app.version)\n")
+ " f.write('%d_%d%s_release\\n' % (bpy.app.version[0], bpy.app.version[1], bpy.app.version_char)\n"
+ " if bpy.app.version_cycle in {'rc', 'release'} else '%d_%d_%d\\n' % bpy.app.version)\n"
+ " f.write('%d_%d_%d' % bpy.app.version)\n")
get_ver_cmd = (args.blender, "--background", "-noaudio", "--factory-startup", "--python-exit-code", "1",
"--python-expr", getver_script, "--", getver_file)
subprocess.run(get_ver_cmd)
with open(getver_file) as f:
- blenver = f.read()
+ blenver, blenver_zip = f.read().split("\n")
os.remove(getver_file)
# IV) Build doc.
@@ -138,7 +139,7 @@ def main():
os.rename(os.path.join(tmp_dir, "sphinx-out"), api_dir)
# VI) Create zip archive.
- zip_name = "blender_python_reference_%s" % blenver
+ zip_name = "blender_python_reference_%s" % blenver_zip # We can't use 'release' postfix here...
zip_path = os.path.join(args.mirror_dir, zip_name)
with zipfile.ZipFile(zip_path, 'w') as zf:
for de in os.scandir(api_dir):
More information about the Bf-blender-cvs
mailing list