ci: use prerelease logic (#2553)
This commit is contained in:
parent
26ceec5f3c
commit
e898be1b7e
26 changed files with 450 additions and 1194 deletions
|
|
@ -5,7 +5,7 @@ if((DEFINED ENV{BRANCH}) AND (DEFINED ENV{BUILD_VERSION}) AND (DEFINED ENV{COMMI
|
|||
MESSAGE("Got from CI master branch and version $ENV{BUILD_VERSION}")
|
||||
set(PROJECT_VERSION $ENV{BUILD_VERSION})
|
||||
elseif((DEFINED ENV{BRANCH}) AND (DEFINED ENV{COMMIT}))
|
||||
# If BRANCH is set but not BUILD_VERSION we are building nightly, we gather only the commit hash
|
||||
# If BRANCH is set but not BUILD_VERSION we are building a PR, we gather only the commit hash
|
||||
MESSAGE("Got from CI $ENV{BRANCH} branch and commit $ENV{COMMIT}")
|
||||
set(PROJECT_VERSION ${PROJECT_VERSION}.$ENV{COMMIT})
|
||||
endif()
|
||||
|
|
@ -19,7 +19,6 @@ else()
|
|||
#Get current Branch
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
|
||||
#WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
OUTPUT_VARIABLE GIT_DESCRIBE_BRANCH
|
||||
RESULT_VARIABLE GIT_DESCRIBE_ERROR_CODE
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
|
|
@ -27,7 +26,6 @@ else()
|
|||
# Gather current commit
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
|
||||
#WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
OUTPUT_VARIABLE GIT_DESCRIBE_VERSION
|
||||
RESULT_VARIABLE GIT_DESCRIBE_ERROR_CODE
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
|
|
@ -35,7 +33,6 @@ else()
|
|||
# Check if Dirty
|
||||
execute_process(
|
||||
COMMAND ${GIT_EXECUTABLE} diff --quiet --exit-code
|
||||
#WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
RESULT_VARIABLE GIT_IS_DIRTY
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue