version update

This commit is contained in:
Carles Fernandez 2015-01-13 11:11:23 +01:00
parent d7872fb79b
commit 3b3eb45499
2 changed files with 24 additions and 17 deletions

View File

@ -52,27 +52,34 @@ endif(ENABLE_PACKAGING)
############################### ###############################
# GNSS-SDR version information # GNSS-SDR version information
############################### ###############################
# Get the current working branch set(THIS_IS_A_RELEASE ON) # only related to version name, no further implications.
execute_process( if(NOT ${THIS_IS_A_RELEASE})
COMMAND git rev-parse --abbrev-ref HEAD # Get the current working branch
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} execute_process(
OUTPUT_VARIABLE GIT_BRANCH COMMAND git rev-parse --abbrev-ref HEAD
OUTPUT_STRIP_TRAILING_WHITESPACE WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
) OUTPUT_VARIABLE GIT_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Get the latest abbreviated commit hash of the working branch # Get the latest abbreviated commit hash of the working branch
execute_process( execute_process(
COMMAND git log -1 --format=%h COMMAND git log -1 --format=%h
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_COMMIT_HASH OUTPUT_VARIABLE GIT_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_STRIP_TRAILING_WHITESPACE
) )
endif(NOT ${THIS_IS_A_RELEASE})
set(VERSION_INFO_MAJOR_VERSION 0) set(VERSION_INFO_MAJOR_VERSION 0)
set(VERSION_INFO_API_COMPAT 0) set(VERSION_INFO_API_COMPAT 0)
set(VERSION_INFO_MINOR_VERSION 4.git-${GIT_BRANCH}-${GIT_COMMIT_HASH}) if(${THIS_IS_A_RELEASE})
set(VERSION ${VERSION_INFO_MAJOR_VERSION}.${VERSION_INFO_API_COMPAT}.${VERSION_INFO_MINOR_VERSION}) set(VERSION_INFO_MINOR_VERSION 5)
else(${THIS_IS_A_RELEASE})
set(VERSION_INFO_MINOR_VERSION 4.git-${GIT_BRANCH}-${GIT_COMMIT_HASH})
endif(${THIS_IS_A_RELEASE})
set(VERSION ${VERSION_INFO_MAJOR_VERSION}.${VERSION_INFO_API_COMPAT}.${VERSION_INFO_MINOR_VERSION})
######################################################################## ########################################################################

View File

@ -31,7 +31,7 @@
* ------------------------------------------------------------------------- * -------------------------------------------------------------------------
*/ */
#ifndef GNSS_SDR_VERSION #ifndef GNSS_SDR_VERSION
#define GNSS_SDR_VERSION "0.0.4" #define GNSS_SDR_VERSION "0.0.5"
#endif #endif
#include <ctime> #include <ctime>