From a86b5df005d0c474de973215b112f404902b2607 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 25 May 2020 10:49:04 +0200 Subject: Blender: change bugfix release versioning from a/b/c to .1/.2/.3 The file subversion is no longer used in the Python API or user interface, and is now internal to Blender. User interface, Python API and file I/O metadata now use more consistent formatting for version numbers. Official releases use "2.83.0", "2.83.1", and releases under development use "2.90.0 Alpha", "2.90.0 Beta". Some Python add-ons may need to lower the Blender version in bl_info to (2, 83, 0) or (2, 90, 0) if they used a subversion number higher than 0. https://wiki.blender.org/wiki/Reference/Release_Notes/2.83/Python_API#Compatibility This change is in preparation of LTS releases, and also brings us more in line with semantic versioning. Fixes T76058. Differential Revision: https://developer.blender.org/D7748 --- doc/python_api/sphinx_doc_gen.py | 21 +++++---------------- doc/python_api/sphinx_doc_gen.sh | 8 +------- doc/python_api/sphinx_doc_update.py | 7 +++---- 3 files changed, 9 insertions(+), 27 deletions(-) (limited to 'doc') diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py index 84a5af8b11e..676fa26a17a 100644 --- a/doc/python_api/sphinx_doc_gen.py +++ b/doc/python_api/sphinx_doc_gen.py @@ -403,32 +403,21 @@ MODULE_GROUPING = { # -------------------------------BLENDER---------------------------------------- -blender_version_strings = [str(v) for v in bpy.app.version] -is_release = bpy.app.version_cycle in {"rc", "release"} - # converting bytes to strings, due to T30154 BLENDER_REVISION = str(bpy.app.build_hash, 'utf_8') -if is_release: - # '2.62a' - BLENDER_VERSION_DOTS = ".".join(blender_version_strings[:2]) + bpy.app.version_char -else: - # '2.62.1' - BLENDER_VERSION_DOTS = ".".join(blender_version_strings) +# '2.83.0 Beta' or '2.83.0' or '2.83.1' +BLENDER_VERSION_DOTS = bpy.app.version_string if BLENDER_REVISION != "Unknown": - # '2.62a SHA1' (release) or '2.62.1 SHA1' (non-release) + # SHA1 Git hash BLENDER_VERSION_HASH = BLENDER_REVISION else: # Fallback: Should not be used BLENDER_VERSION_HASH = "Hash Unknown" -if is_release: - # '2_62a_release' - BLENDER_VERSION_PATH = "%s%s_release" % ("_".join(blender_version_strings[:2]), bpy.app.version_char) -else: - # '2_62_1' - BLENDER_VERSION_PATH = "_".join(blender_version_strings) +# '2_83' +BLENDER_VERSION_PATH = "%d_%d" % (bpy.app.version[0], bpy.app.version[1]) # --------------------------DOWNLOADABLE FILES---------------------------------- diff --git a/doc/python_api/sphinx_doc_gen.sh b/doc/python_api/sphinx_doc_gen.sh index 45cd6a229e5..1c5b9ec0b61 100755 --- a/doc/python_api/sphinx_doc_gen.sh +++ b/doc/python_api/sphinx_doc_gen.sh @@ -36,16 +36,10 @@ fi blender_srcdir=$(dirname -- $0)/../.. blender_version_header="$blender_srcdir/source/blender/blenkernel/BKE_blender_version.h" blender_version=$(grep "BLENDER_VERSION\s" "$blender_version_header" | awk '{print $3}') -blender_version_char=$(grep "BLENDER_VERSION_CHAR\s" "$blender_version_header" | awk '{print $3}') blender_version_cycle=$(grep "BLENDER_VERSION_CYCLE\s" "$blender_version_header" | awk '{print $3}') -blender_subversion=$(grep "BLENDER_SUBVERSION\s" "$blender_version_header" | awk '{print $3}') unset blender_version_header -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 -fi +BLENDER_VERSION=$(expr $blender_version / 100)_$(expr $blender_version % 100) SSH_UPLOAD_FULL=$SSH_UPLOAD/"blender_python_api_"$BLENDER_VERSION diff --git a/doc/python_api/sphinx_doc_update.py b/doc/python_api/sphinx_doc_update.py index d3f42b1d26f..6b24f4c4c09 100755 --- a/doc/python_api/sphinx_doc_update.py +++ b/doc/python_api/sphinx_doc_update.py @@ -127,11 +127,10 @@ def main(): " f.write('%d\\n' % is_release)\n" " f.write('%d\\n' % is_beta)\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" - " f.write('%d.%d%s\\n' % (bpy.app.version[0], bpy.app.version[1], bpy.app.version_char)\n" + " f.write('%d.%d\\n' % (bpy.app.version[0], bpy.app.version[1]))\n" + " f.write('%d.%d\\n' % (bpy.app.version[0], bpy.app.version[1]))\n" " if (is_release or is_beta) else '%s\\n' % branch)\n" - " f.write('%d_%d%s_release' % (bpy.app.version[0], bpy.app.version[1], bpy.app.version_char)\n" - " if is_release else '%d_%d_%d' % bpy.app.version)\n" + " f.write('%d_%d' % (bpy.app.version[0], bpy.app.version[1]))\n" ) get_ver_cmd = (args.blender, "--background", "-noaudio", "--factory-startup", "--python-exit-code", "1", "--python-expr", getver_script, "--", getver_file) -- cgit v1.2.3