Skip to content

Commit

Permalink
Fix git commit detection for Windows CI
Browse files Browse the repository at this point in the history
  • Loading branch information
rollerozxa committed Dec 8, 2024
1 parent 6b61fe8 commit 1f1917b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
release: false
msystem: UCRT64
pacboy: >-
git:
gcc:p
cmake:p
ninja:p
Expand Down
8 changes: 4 additions & 4 deletions cmake/Modules/GenerateGitVersion.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@

set(VERSION_GITHASH "(none)")

execute_process(COMMAND git rev-parse --short HEAD
WORKING_DIRECTORY "${GENERATE_VERSION_SOURCE_DIR}"
OUTPUT_VARIABLE VERSION_GITHASH OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET)
if(VERSION_GITHASH)
set(VERSION_GITHASH "${VERSION_GITHASH}")
if(NOT VERSION_GITHASH)
set(VERSION_GITHASH "(none)")
else()
message(STATUS "*** Detected Git commit ${VERSION_GITHASH} ***")
endif()

configure_file(
Expand Down

0 comments on commit 1f1917b

Please sign in to comment.