Add support for BUILDS_TODAY to CMake
This commit is contained in:
parent
0f137543e4
commit
e041af6010
|
@ -91,8 +91,14 @@ endif()
|
||||||
#endif()
|
#endif()
|
||||||
|
|
||||||
string (TIMESTAMP SYNERGY_BUILD_DATE "%Y%m%d" UTC)
|
string (TIMESTAMP SYNERGY_BUILD_DATE "%Y%m%d" UTC)
|
||||||
|
if (DEFINED ENV{BUILDS_TODAY})
|
||||||
|
set (SYNERGY_BUILDS_TODAY $ENV{BUILDS_TODAY})
|
||||||
|
else()
|
||||||
|
set (SYNERGY_BUILDS_TODAY 1)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (DEFINED ENV{BUILD_NUMBER})
|
if (DEFINED ENV{BUILD_NUMBER})
|
||||||
set (SYNERGY_BUILD_NUMBER $ENV{BUILD_NUMBER}})
|
set (SYNERGY_BUILD_NUMBER $ENV{BUILD_NUMBER})
|
||||||
else()
|
else()
|
||||||
set (SYNERGY_BUILD_NUMBER 1)
|
set (SYNERGY_BUILD_NUMBER 1)
|
||||||
endif()
|
endif()
|
||||||
|
@ -101,7 +107,7 @@ set (SYNERGY_VERSION "${SYNERGY_VERSION_MAJOR}.${SYNERGY_VERSION_MINOR}.${SYNERG
|
||||||
set (SYNERGY_SNAPSHOT_INFO "${SYNERGY_BUILD_DATE}.${SYNERGY_REVISION}")
|
set (SYNERGY_SNAPSHOT_INFO "${SYNERGY_BUILD_DATE}.${SYNERGY_REVISION}")
|
||||||
|
|
||||||
if (SYNERGY_VERSION_STAGE STREQUAL "git")
|
if (SYNERGY_VERSION_STAGE STREQUAL "git")
|
||||||
set (SYNERGY_VERSION_TAG "b${SYNERGY_BUILD_NUMBER}.${SYNERGY_SNAPSHOT_INFO}")
|
set (SYNERGY_VERSION_TAG "${SYNERGY_SNAPSHOT_INFO}")
|
||||||
else()
|
else()
|
||||||
set (SYNERGY_VERSION_TAG "${SYNERGY_VERSION_STAGE}")
|
set (SYNERGY_VERSION_TAG "${SYNERGY_VERSION_STAGE}")
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue