Skip to content

Commit

Permalink
Fix git helper functions and their usage
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmad-el-sayed committed Sep 11, 2024
1 parent 272cec1 commit 66701a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cmake/git_helpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ endfunction()
# Checks if the branch name is "main" or starts with "release/"
function(is_main_or_release_branch branch_name result)
if("${branch_name}" STREQUAL "main" OR "${branch_name}" MATCHES "^release/")
set(${result} "true" PARENT_SCOPE)
set(${result} true PARENT_SCOPE)
else()
set(${result} "false" PARENT_SCOPE)
set(${result} false PARENT_SCOPE)
endif()
endfunction()
2 changes: 1 addition & 1 deletion libs/UGridNET/nuget/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include(${CMAKE_SOURCE_DIR}/cmake/git_helpers.cmake)
set(VERSION_SUFFIX "")
if(${GIT_FOUND})
get_current_branch_name(current_branch_name)
is_main_or_release_branch("${current_branch}" on_main_or_release_branch)
is_main_or_release_branch("${current_branch_name}" on_main_or_release_branch)
if(NOT ${on_main_or_release_branch})
set(VERSION_SUFFIX "-dev")
endif()
Expand Down

0 comments on commit 66701a8

Please sign in to comment.