2016-03-10 06:53:21 +01:00
|
|
|
|
|
|
|
execute_process( COMMAND git log -1 --format=%cn-%t/%h-%ct WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE BUILD_ID ERROR_QUIET )
|
|
|
|
execute_process( COMMAND sh -c "git branch | grep '^*' | sed 's;^*;;g' " WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE VERSION_ID ERROR_QUIET )
|
2018-12-31 15:48:29 +01:00
|
|
|
execute_process( COMMAND sh -c "git remote --verbose | grep origin | grep fetch | cut -f2 | cut -d' ' -f1" WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} OUTPUT_VARIABLE GIT_REMOTE_PATH ERROR_QUIET )
|
2016-03-10 06:53:21 +01:00
|
|
|
|
|
|
|
STRING ( STRIP "${BUILD_ID}" BUILD_ID )
|
|
|
|
STRING ( STRIP "${VERSION_ID}" VERSION_ID )
|
2018-12-31 15:48:29 +01:00
|
|
|
STRING ( STRIP "${GIT_REMOTE_PATH}" GIT_REMOTE_PATH )
|
2020-02-16 13:55:38 +01:00
|
|
|
SET ( HYPERION_BUILD_ID "${VERSION_ID} (${BUILD_ID})" )
|
|
|
|
SET ( HYPERION_GIT_REMOTE "${GIT_REMOTE_PATH}" )
|
2019-07-12 16:54:26 +02:00
|
|
|
SET ( HYPERION_VERSION "${HYPERION_VERSION_CHANNEL} ${HYPERION_VERSION_MAJOR}.${HYPERION_VERSION_MINOR}.${HYPERION_VERSION_PATCH}" )
|
|
|
|
message ( STATUS "Current Version: ${HYPERION_VERSION}" )
|
|
|
|
message ( STATUS " - Build: ${HYPERION_BUILD_ID}" )
|