mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-16 23:17:29 +00:00
Fix branch name for AppVeyor Builds (#3472)
This commit is contained in:
parent
c6e6f4afea
commit
8e66e719fa
@ -19,12 +19,17 @@ if(GIT_FOUND AND EXISTS "${SOURCE_DIR}/../.git/")
|
||||
if(NOT ${exit_code} EQUAL 0)
|
||||
message(WARNING "git rev-parse failed, unable to include version.")
|
||||
endif()
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
RESULT_VARIABLE exit_code
|
||||
OUTPUT_VARIABLE GIT_BRANCH)
|
||||
if(NOT ${exit_code} EQUAL 0)
|
||||
message(WARNING "git rev-parse failed, unable to include git branch.")
|
||||
# Hack fix for AppVeyor (Pull Requests don't generate a branch name)
|
||||
if(NOT DEFINED ENV{APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH})
|
||||
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
RESULT_VARIABLE exit_code
|
||||
OUTPUT_VARIABLE GIT_BRANCH)
|
||||
if(NOT ${exit_code} EQUAL 0)
|
||||
message(WARNING "git rev-parse failed, unable to include git branch.")
|
||||
endif()
|
||||
else()
|
||||
set(GIT_BRANCH $ENV{APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH})
|
||||
endif()
|
||||
string(STRIP ${GIT_VERSION} GIT_VERSION)
|
||||
string(STRIP ${GIT_VERSION_} GIT_VERSION_)
|
||||
|
Loading…
Reference in New Issue
Block a user