From 61f579b591eb6b9af269ab5fa2964375d9afd84e Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 26 Mar 2021 14:44:28 +0100 Subject: [PATCH] CMake: drop rc from version number In current development, RC is effectively 0 (for a release) or 1 (during development). It doesn't add anything to suffix 'rc1' to the version number. While here, remove the BUILD_RELEASE check (because nothing ever sets it) and instead rely on the RC setting instead to decide for long-calamares-version --- CMakeLists.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a95768f2d..d8f8cff8a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -500,16 +500,13 @@ if( CALAMARES_VERSION_TWEAK ) set( CALAMARES_VERSION "${CALAMARES_VERSION}.${CALAMARES_VERSION_TWEAK}" ) endif() set( CALAMARES_VERSION_SHORT "${CALAMARES_VERSION}" ) -if( CALAMARES_VERSION_RC ) - set( CALAMARES_VERSION ${CALAMARES_VERSION}rc${CALAMARES_VERSION_RC} ) -endif() # Additional info for non-release builds. The "extended" version information # with date and git information (commit, dirty status) is used only # 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/" ) +if( NOT CALAMARES_VERSION_RC EQUAL 0 AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git/" ) include( CMakeDateStamp ) set( CALAMARES_VERSION_DATE "${CMAKE_DATESTAMP_YEAR}${CMAKE_DATESTAMP_MONTH}${CMAKE_DATESTAMP_DAY}" ) if( CALAMARES_VERSION_DATE GREATER 0 )