Skip to content
Snippets Groups Projects
Verified Commit 42d25e1b authored by Lars Bilke's avatar Lars Bilke
Browse files

[CMake] Fix git branch detection on CI.

parent 5129dd6a
No related branches found
No related tags found
No related merge requests found
......@@ -29,12 +29,16 @@ if(NOT IS_GIT_REPO)
endif()
if(IS_GIT_REPO)
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE OGS_GIT_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(DEFINED ENV{CI_COMMIT_BRANCH})
set(OGS_GIT_BRANCH $ENV{CI_COMMIT_BRANCH})
else()
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
OUTPUT_VARIABLE OGS_GIT_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
endif()
endif()
if(IS_GIT_REPO AND NOT OGS_VERSION)
......
......@@ -4,6 +4,8 @@ title = "Welcome!"
author = "Lars Bilke"
weight = 1001
aliases = ["/docs/devguide"]
[menu.docs]
name = "Developer Guide"
identifier = "devguide"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment