mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-28 01:49:33 -06:00
ScmRevGen: Set commits ahead to zero when on a tag
This commit is contained in:
@ -22,16 +22,17 @@ if(GIT_FOUND)
|
||||
execute_process(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} rev-list --count HEAD ^master
|
||||
OUTPUT_VARIABLE DOLPHIN_WC_COMMITS_AHEAD_MASTER
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
# defines DOLPHIN_WC_TAG
|
||||
execute_process(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} describe --exact-match HEAD
|
||||
OUTPUT_VARIABLE DOLPHIN_WC_TAG
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
|
||||
# version number
|
||||
set(DOLPHIN_VERSION_MAJOR "5")
|
||||
set(DOLPHIN_VERSION_MINOR "0")
|
||||
if(DOLPHIN_WC_BRANCH STREQUAL "stable")
|
||||
set(DOLPHIN_VERSION_PATCH "0")
|
||||
else()
|
||||
set(DOLPHIN_VERSION_PATCH ${DOLPHIN_WC_REVISION})
|
||||
endif()
|
||||
set(DOLPHIN_VERSION_PATCH ${DOLPHIN_WC_REVISION})
|
||||
|
||||
# If Dolphin is not built from a Git repository, default the version info to
|
||||
# reasonable values.
|
||||
@ -42,6 +43,13 @@ if(NOT DOLPHIN_WC_REVISION)
|
||||
set(DOLPHIN_WC_COMMITS_AHEAD_MASTER 0)
|
||||
endif()
|
||||
|
||||
# If this is a tag (i.e. a release), then set the current patch version and
|
||||
# the number of commits ahead to zero.
|
||||
if(DOLPHIN_WC_TAG)
|
||||
set(DOLPHIN_VERSION_PATCH "0")
|
||||
set(DOLPHIN_WC_COMMITS_AHEAD_MASTER 0)
|
||||
endif()
|
||||
|
||||
function(configure_source_file path)
|
||||
configure_file(
|
||||
"${PROJECT_SOURCE_DIR}/${path}.in"
|
||||
|
Reference in New Issue
Block a user