CMake: partial revert of updated versioning
- Keep the project() version as literal, drop the script-mode changes, to keep existing (weird?) build-and-packaging hacks working. - Do switch to unified versioning-git-annotations CMake module, do drop the "rc" from version numbers.
This commit is contained in:
parent
94bd17ecf5
commit
53beea6061
@ -40,23 +40,13 @@
|
|||||||
|
|
||||||
# TODO:3.3: Require CMake 3.12
|
# TODO:3.3: Require CMake 3.12
|
||||||
cmake_minimum_required( VERSION 3.3 FATAL_ERROR )
|
cmake_minimum_required( VERSION 3.3 FATAL_ERROR )
|
||||||
|
|
||||||
set( CALAMARES_VERSION 3.2.40 )
|
|
||||||
set( CALAMARES_RELEASE_MODE OFF )
|
|
||||||
|
|
||||||
if ( CMAKE_SCRIPT_MODE_FILE )
|
|
||||||
include( ${CMAKE_CURRENT_LIST_DIR}/CMakeModules/ExtendedVersion.cmake )
|
|
||||||
set( CMAKE_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR} )
|
|
||||||
extend_version( ${CALAMARES_VERSION} OFF _vshort _vlong )
|
|
||||||
message( "${_vlong}" )
|
|
||||||
return()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
project( CALAMARES
|
project( CALAMARES
|
||||||
VERSION ${CALAMARES_VERSION}
|
VERSION 3.2.40
|
||||||
LANGUAGES C CXX
|
LANGUAGES C CXX
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set( CALAMARES_VERSION_RC 1 ) # Set to 0 during release cycle, 1 during development
|
||||||
|
|
||||||
### OPTIONS
|
### OPTIONS
|
||||||
#
|
#
|
||||||
option( INSTALL_CONFIG "Install configuration files" OFF )
|
option( INSTALL_CONFIG "Install configuration files" OFF )
|
||||||
@ -190,7 +180,6 @@ include( FeatureSummary )
|
|||||||
|
|
||||||
# Calamares Modules
|
# Calamares Modules
|
||||||
include( CMakeColors )
|
include( CMakeColors )
|
||||||
include( ExtendedVersion )
|
|
||||||
|
|
||||||
### C++ SETUP
|
### C++ SETUP
|
||||||
#
|
#
|
||||||
@ -505,21 +494,30 @@ add_feature_info( ExampleDistro ${mksquashfs_FOUND} "Create example-distro targe
|
|||||||
|
|
||||||
### CALAMARES PROPER
|
### CALAMARES PROPER
|
||||||
#
|
#
|
||||||
#
|
set( CALAMARES_VERSION ${CALAMARES_VERSION_MAJOR}.${CALAMARES_VERSION_MINOR}.${CALAMARES_VERSION_PATCH} )
|
||||||
extend_version( "${CALAMARES_VERSION}" ${CALAMARES_RELEASE_MODE} CALAMARES_VERSION_SHORT CALAMARES_VERSION )
|
# In rare cases we have hotfix-releases with a tweak
|
||||||
|
if( CALAMARES_VERSION_TWEAK )
|
||||||
|
set( CALAMARES_VERSION "${CALAMARES_VERSION}.${CALAMARES_VERSION_TWEAK}" )
|
||||||
|
endif()
|
||||||
|
set( CALAMARES_VERSION_SHORT "${CALAMARES_VERSION}" )
|
||||||
|
|
||||||
# Special target for displaying the version. In RC (might-be-release)
|
# Additional info for non-release builds. The "extended" version information
|
||||||
# builds, use the short version (3.x.y), otherwise show the long version.
|
# with date and git information (commit, dirty status) is used only
|
||||||
if ( CALAMARES_RELEASE_MODE )
|
# by CalamaresVersionX.h, which is included by consumers that need a full
|
||||||
|
# version number with all that information; normal consumers can include
|
||||||
|
# CalamaresVersion.h with more stable numbers.
|
||||||
|
if( NOT BUILD_RELEASE AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git/" )
|
||||||
|
include( ExtendedVersion )
|
||||||
|
extend_version( "${CALAMARES_VERSION}" OFF CALAMARES_VERSION_SHORT CALAMARES_VERSION )
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Special target for not-RC (e.g. might-be-release) builds.
|
||||||
|
# This is used by the release script to get the version.
|
||||||
|
if ( CALAMARES_VERSION_RC EQUAL 0 )
|
||||||
add_custom_target(show-version
|
add_custom_target(show-version
|
||||||
${CMAKE_COMMAND} -E echo CALAMARES_VERSION=${CALAMARES_VERSION_SHORT}
|
${CMAKE_COMMAND} -E echo CALAMARES_VERSION=${CALAMARES_VERSION_SHORT}
|
||||||
USES_TERMINAL
|
USES_TERMINAL
|
||||||
)
|
)
|
||||||
else()
|
|
||||||
add_custom_target(show-version
|
|
||||||
${CMAKE_COMMAND} -E echo CALAMARES_VERSION=${CALAMARES_VERSION}
|
|
||||||
USES_TERMINAL
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# enforce using constBegin, constEnd for const-iterators
|
# enforce using constBegin, constEnd for const-iterators
|
||||||
|
Loading…
Reference in New Issue
Block a user