Set correct git tag in CI
This commit is contained in:
parent
b0e083d61d
commit
94e73cbe15
2 changed files with 20 additions and 11 deletions
7
.github/workflows/continuous_integration.yml
vendored
7
.github/workflows/continuous_integration.yml
vendored
|
|
@ -73,7 +73,11 @@ jobs:
|
|||
wget -q "https://github.com/coelckers/gzdoom/releases/download/ci_deps/${ZMUSIC_PACKAGE}"
|
||||
tar -xf "${ZMUSIC_PACKAGE}"
|
||||
fi
|
||||
|
||||
|
||||
- name: Git describe
|
||||
id: ghd
|
||||
uses: proudust/gh-describe@v2
|
||||
|
||||
- name: Configure
|
||||
shell: bash
|
||||
run: |
|
||||
|
|
@ -82,6 +86,7 @@ jobs:
|
|||
- name: Build
|
||||
shell: bash
|
||||
run: |
|
||||
export GIT_DESCRIBE="${{ steps.ghd.outputs.describe }}"
|
||||
export MAKEFLAGS=--keep-going
|
||||
cmake --build build --config ${{ matrix.config.build_type }} --parallel 3
|
||||
|
||||
|
|
|
|||
|
|
@ -15,16 +15,20 @@ endmacro()
|
|||
# Populate variables "Hash", "Tag", and "Timestamp" with relevant information
|
||||
# from source repository. If anything goes wrong return something in "Error."
|
||||
function(query_repo_info)
|
||||
execute_process(
|
||||
COMMAND git describe --tags --dirty=-m
|
||||
RESULT_VARIABLE Error
|
||||
OUTPUT_VARIABLE Tag
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if(NOT "${Error}" STREQUAL "0")
|
||||
ret_var(Error)
|
||||
return()
|
||||
if(DEFINED ENV{GIT_DESCRIBE})
|
||||
set(Tag "$ENV{GIT_DESCRIBE}")
|
||||
else()
|
||||
execute_process(
|
||||
COMMAND git describe --tags --dirty=-m
|
||||
RESULT_VARIABLE Error
|
||||
OUTPUT_VARIABLE Tag
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
if(NOT "${Error}" STREQUAL "0")
|
||||
ret_var(Error)
|
||||
return()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue