diff options
author | Brecht Van Lommel <brecht> | 2020-05-25 11:49:04 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-05-29 18:48:26 +0300 |
commit | a86b5df005d0c474de973215b112f404902b2607 (patch) | |
tree | ed5d1e453beb37e8fe416242008e3283bf8dc2e9 /build_files/cmake | |
parent | 1d2b89304ac33993c29f53ebdd41cc84056982d1 (diff) |
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
Diffstat (limited to 'build_files/cmake')
-rw-r--r-- | build_files/cmake/macros.cmake | 33 | ||||
-rw-r--r-- | build_files/cmake/packaging.cmake | 2 |
2 files changed, 6 insertions, 29 deletions
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index 6287da55580..804447dbef3 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -748,8 +748,7 @@ function(get_blender_version) # - BLENDER_VERSION (major.minor) # - BLENDER_VERSION_MAJOR # - BLENDER_VERSION_MINOR - # - BLENDER_SUBVERSION (used for internal versioning mainly) - # - BLENDER_VERSION_CHAR (a, b, c, ...or empty string) + # - BLENDER_VERSION_PATCH # - BLENDER_VERSION_CYCLE (alpha, beta, rc, release) # So cmake depends on BKE_blender.h, beware of inf-loops! @@ -759,25 +758,15 @@ function(get_blender_version) file(STRINGS ${CMAKE_SOURCE_DIR}/source/blender/blenkernel/BKE_blender_version.h _contents REGEX "^#define[ \t]+BLENDER_.*$") string(REGEX REPLACE ".*#define[ \t]+BLENDER_VERSION[ \t]+([0-9]+).*" "\\1" _out_version "${_contents}") - string(REGEX REPLACE ".*#define[ \t]+BLENDER_SUBVERSION[ \t]+([0-9]+).*" "\\1" _out_subversion "${_contents}") - string(REGEX REPLACE ".*#define[ \t]+BLENDER_VERSION_CHAR[ \t]+([a-z]+).*" "\\1" _out_version_char "${_contents}") + string(REGEX REPLACE ".*#define[ \t]+BLENDER_VERSION_PATCH[ \t]+([0-9]+).*" "\\1" _out_version_patch "${_contents}") string(REGEX REPLACE ".*#define[ \t]+BLENDER_VERSION_CYCLE[ \t]+([a-z]+).*" "\\1" _out_version_cycle "${_contents}") if(NOT ${_out_version} MATCHES "[0-9]+") message(FATAL_ERROR "Version parsing failed for BLENDER_VERSION") endif() - if(NOT ${_out_subversion} MATCHES "[0-9]+") - message(FATAL_ERROR "Version parsing failed for BLENDER_SUBVERSION") - endif() - - # clumsy regex, only single char are ok but it could be unset - - string(LENGTH "${_out_version_char}" _out_version_char_len) - if(NOT _out_version_char_len EQUAL 1) - set(_out_version_char "") - elseif(NOT ${_out_version_char} MATCHES "[a-z]+") - message(FATAL_ERROR "Version parsing failed for BLENDER_VERSION_CHAR") + if(NOT ${_out_version_patch} MATCHES "[0-9]+") + message(FATAL_ERROR "Version parsing failed for BLENDER_VERSION_PATCH") endif() if(NOT ${_out_version_cycle} MATCHES "[a-z]+") @@ -787,23 +776,11 @@ function(get_blender_version) math(EXPR _out_version_major "${_out_version} / 100") math(EXPR _out_version_minor "${_out_version} % 100") - # for packaging, alpha to numbers - string(COMPARE EQUAL "${_out_version_char}" "" _out_version_char_empty) - if(${_out_version_char_empty}) - set(_out_version_char_index "0") - else() - set(_char_ls a b c d e f g h i j k l m n o p q r s t u v w x y z) - list(FIND _char_ls ${_out_version_char} _out_version_char_index) - math(EXPR _out_version_char_index "${_out_version_char_index} + 1") - endif() - # output vars set(BLENDER_VERSION "${_out_version_major}.${_out_version_minor}" PARENT_SCOPE) set(BLENDER_VERSION_MAJOR "${_out_version_major}" PARENT_SCOPE) set(BLENDER_VERSION_MINOR "${_out_version_minor}" PARENT_SCOPE) - set(BLENDER_SUBVERSION "${_out_subversion}" PARENT_SCOPE) - set(BLENDER_VERSION_CHAR "${_out_version_char}" PARENT_SCOPE) - set(BLENDER_VERSION_CHAR_INDEX "${_out_version_char_index}" PARENT_SCOPE) + set(BLENDER_VERSION_PATCH "${_out_version_patch}" PARENT_SCOPE) set(BLENDER_VERSION_CYCLE "${_out_version_cycle}" PARENT_SCOPE) endfunction() diff --git a/build_files/cmake/packaging.cmake b/build_files/cmake/packaging.cmake index 0e530463659..de27d31323d 100644 --- a/build_files/cmake/packaging.cmake +++ b/build_files/cmake/packaging.cmake @@ -7,7 +7,7 @@ set(PROJECT_VENDOR "Blender Foundation") set(MAJOR_VERSION ${BLENDER_VERSION_MAJOR}) set(MINOR_VERSION ${BLENDER_VERSION_MINOR}) -set(PATCH_VERSION ${BLENDER_VERSION_CHAR_INDEX}) +set(PATCH_VERSION ${BLENDER_VERSION_PATCH}) set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}) set(CPACK_PACKAGE_DESCRIPTION ${PROJECT_DESCRIPTION}) |