mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 02:32:36 +01:00
* Restore GIT_BRANCH Removed by mistake on previous commit * Fix commit count on AppVeyor builds
This commit is contained in:
parent
6b323d7e2e
commit
60f5929f81
@ -55,6 +55,9 @@ if errorlevel 1 (
|
|||||||
goto done
|
goto done
|
||||||
)
|
)
|
||||||
|
|
||||||
|
rem // Get commit count from (unshallowed) HEAD
|
||||||
|
for /F %%I IN ('call %GIT% rev-list HEAD --count') do set COMMIT_COUNT=%%I
|
||||||
|
|
||||||
rem // If we're in AppVeyor, building a non-master, pull request artifact
|
rem // If we're in AppVeyor, building a non-master, pull request artifact
|
||||||
if defined APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH (
|
if defined APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH (
|
||||||
|
|
||||||
@ -71,10 +74,8 @@ if defined APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH (
|
|||||||
for /F %%I IN ('call %GIT% rev-parse --short HEAD') do set GIT_VERSION=%%I
|
for /F %%I IN ('call %GIT% rev-parse --short HEAD') do set GIT_VERSION=%%I
|
||||||
|
|
||||||
) else (
|
) else (
|
||||||
rem // Get commit count from (unshallowed) HEAD
|
|
||||||
for /F %%I IN ('call %GIT% rev-list HEAD --count') do set GIT_VERSION=%%I
|
|
||||||
rem // Get last commit (shortened) and concat after commit count in GIT_VERSION
|
rem // Get last commit (shortened) and concat after commit count in GIT_VERSION
|
||||||
for /F %%I IN ('call %GIT% rev-parse --short HEAD') do set GIT_VERSION=%GIT_VERSION%-%%I
|
for /F %%I IN ('call %GIT% rev-parse --short HEAD') do set GIT_VERSION=%COMMIT_COUNT%-%%I
|
||||||
|
|
||||||
for /F %%I IN ('call %GIT% rev-parse --abbrev-ref HEAD') do set GIT_BRANCH=%%I
|
for /F %%I IN ('call %GIT% rev-parse --abbrev-ref HEAD') do set GIT_BRANCH=%%I
|
||||||
)
|
)
|
||||||
|
@ -19,20 +19,13 @@ if(GIT_FOUND AND EXISTS "${SOURCE_DIR}/../.git/")
|
|||||||
if(NOT ${exit_code} EQUAL 0)
|
if(NOT ${exit_code} EQUAL 0)
|
||||||
message(WARNING "git rev-parse failed, unable to include version.")
|
message(WARNING "git rev-parse failed, unable to include version.")
|
||||||
endif()
|
endif()
|
||||||
# (Unused code, we're currently building with MSVC on AppVeyor)
|
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
|
||||||
# Hack fix for AppVeyor (Pull Requests don't generate a branch name)
|
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||||
#
|
RESULT_VARIABLE exit_code
|
||||||
# if(NOT DEFINED ENV{APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH})
|
OUTPUT_VARIABLE GIT_BRANCH)
|
||||||
# execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
|
if(NOT ${exit_code} EQUAL 0)
|
||||||
# WORKING_DIRECTORY ${SOURCE_DIR}
|
message(WARNING "git rev-parse failed, unable to include git branch.")
|
||||||
# RESULT_VARIABLE exit_code
|
endif()
|
||||||
# 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)
|
||||||
string(STRIP ${GIT_VERSION_} GIT_VERSION_)
|
string(STRIP ${GIT_VERSION_} GIT_VERSION_)
|
||||||
string(STRIP ${GIT_VERSION}-${GIT_VERSION_} GIT_VERSION)
|
string(STRIP ${GIT_VERSION}-${GIT_VERSION_} GIT_VERSION)
|
||||||
|
Loading…
Reference in New Issue
Block a user